aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
2018-12-13T23:00:28.064600Z

hi! I’m trying out cognitect.aws.credentials and cognitect.aws.client.api for the first time. I think I’ve constructed my creds map properly, but I get a stacktrace when I attempt to create the client:

(type (credentials/basic-credentials-provider creds)) => cognitect.aws.credentials$basic_credentials_provider$reify__15156

(def client (aws/client {:api :ec2
                         :credentials-provider (credentials/basic-credentials-provider creds)
                         }))
Syntax error (ExceptionInfo) compiling at (REPL:31:13).
Cannot find resource cognitect/aws/ec2/service.edn. 
Please lmk how to remedy?

2018-12-13T23:01:58.064800Z

(keys creds) => (:access-key-id :secret-access-key)

2018-12-13T23:02:10.065Z

thanks in advance

alexmiller 2018-12-13T23:08:59.065700Z

Looks like maybe you don’t have the ec2 jar in your deps?

2018-12-13T23:10:51.066600Z

could be… my first foray using the deps.edn ecosystem rather than leiningen as well

2018-12-13T23:10:54.066800Z

thanks

alexmiller 2018-12-13T23:11:38.067900Z

You should have at least 3 deps - api, endpoints, and whatever service(s) you’re hitting

2018-12-14T19:10:21.074700Z

Hi Alex, I have the api and endpoints resolving well. Could you give me a hint as to the correct way to specify the ec2 service?

2018-12-14T19:10:50.074900Z

or a simple example that launches an ec2 instance that I can ssh into then shutdown?

alexmiller 2018-12-14T19:24:20.075100Z

sorry, I’m not an expert on ec2 - if you have something that isn’t working, you could post the code as an issue on the aws repo though

2018-12-14T19:29:45.075300Z

sure, will do. It’s basically the examples/ec2_examples.clj that doesn’t work

2018-12-14T19:30:14.075600Z

(at least for me)

alexmiller 2018-12-14T19:36:07.075800Z

well please log so David or someone else can take a look

2018-12-14T19:36:14.076Z

will do

alexmiller 2018-12-14T19:36:22.076200Z

thx

2018-12-13T23:12:10.068200Z

ah - I only have api, and credentials

2018-12-13T23:12:17.068400Z

that must be it

2018-12-13T23:13:38.068700Z

btw, I was literally just following https://github.com/cognitect-labs/aws-api/blob/master/examples/ec2_examples.clj

chrisulloa 2018-12-13T23:14:42.069200Z

To use s3 I had to bring this into my project.clj [com.cognitect.aws/s3 “680.2.370.0”]

chrisulloa 2018-12-13T23:14:51.069600Z

Does adding [com.cognitect.aws/ec2 “681.2.373.0”] make this work for you?

chrisulloa 2018-12-13T23:19:13.071100Z

You might also have to provide region as well, if your creds/region aren’t configured in your environment.

2018-12-13T23:19:45.071500Z

I’ll need to read up a bit more before proceeding…

chrisulloa 2018-12-13T23:21:58.073Z

(aws/client {:api :ec2, :region "us-east-1", :credentials-provider (basic-credentials-provider {:access-key-id "" :secret-access-key ""})})

2018-12-13T23:47:28.073500Z

@simon223

simesy 2018-12-13T23:52:33.074Z

hey @thedavidmeister

2018-12-13T23:52:45.074200Z

howdy

1