aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
Jakub Holý 2019-12-24T15:37:00.014Z

I've just published https://blog.jakubholy.net/2019/secure-repl-for-aws-fargate-services/ Feedback and improvements welcome! Also, Merry 🎄!

👍 1
ghadi 2019-12-24T15:47:11.014600Z

@holyjak I enjoyed that, thanks!

❤️ 1
Jakub Holý 2019-12-24T18:40:59.014900Z

Thank you! I've now fixed links to the Tf modules

danielglauser 2019-12-24T20:25:09.016600Z

Trying to use the Cognitect aws-api project to interact with S3. I can invoke ListBuckets however if I try anything else like ListObjectsV2 or PutObject all I get back is:

{:cognitect.anomalies/category :cognitect.anomalies/fault,
 :cognitect.aws.client/throwable nil}

danielglauser 2019-12-24T20:25:35.017400Z

Does anyone know how I can get more information to see what’s failing?

ghadi 2019-12-24T20:25:54.018100Z

Need more info. Can you post your client construction and invocation?

danielglauser 2019-12-24T20:29:18.019Z

(def s3 (aws/client {:api :s3                                                |
                        :credentials-provider (credentials/basic-credentials-provider
                                               creds)}))

(aws/invoke s3 {:op :ListBuckets})
<correct response>

(aws/invoke s3 {:op :ListObjectsV2 :request {:Bucket "valid-bucket-name"}})
{:cognitect.anomalies/category :cognitect.anomalies/fault,
 :cognitect.aws.client/throwable nil}

ghadi 2019-12-24T20:30:58.019600Z

What region is the bucket in?

danielglauser 2019-12-24T20:31:46.019800Z

US West (N. California)

ghadi 2019-12-24T20:40:28.020500Z

What region is the client/code in?

ghadi 2019-12-24T20:40:36.020700Z

They have to match

ghadi 2019-12-24T20:41:29.021800Z

Is AWS_REGION is set in your env?

ghadi 2019-12-24T20:41:41.022100Z

@danielglauser

ghadi 2019-12-24T20:41:57.022600Z

Alternatively you can pass an option on the client constructor

danielglauser 2019-12-24T20:45:49.023700Z

I have not set the region anywhere, didn’t think I needed to because ListBuckets worked with out it. I’ll try setting it in the client constructor.

ghadi 2019-12-24T20:46:18.024100Z

ListBuckets is a global op, the others are bucket (region-bound) ops

ghadi 2019-12-24T20:46:38.024500Z

but the error is not helpful, I'll see if we can tighten that up

ghadi 2019-12-24T20:47:19.025400Z

in general if you are running in AWS (EC2, Lambda, ECS) the client ctor doesn't need any options because everything is autodiscovered

ghadi 2019-12-24T20:48:32.026Z

locally I set AWS_PROFILE and have the region+creds in ~/.aws/

ghadi 2019-12-24T20:48:48.026300Z

hope that helps

danielglauser 2019-12-24T20:49:58.026900Z

Adding :region "us-west-1" to the client constructor did the trick. Thanks @ghadi!