aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
lilactown 2019-01-23T00:12:20.062700Z

I’m trying to use the S3 API:

(aws/invoke s3 {:op :CreateBucket :request {:Bucket bucket-name}})
but I’m getting:
{:Code "IllegalLocationConstraintException",
 :Message
 "The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.",
 :RequestId "8542E011B3C15E87",
 :HostId
 "25VZAk6+s/7WJBfr2vHu4TOL36kJo0EXR9eMz1maK4OCanDnGQjU1cZeNPbtbGTxwUAwOPg1Xrc="}

lilactown 2019-01-23T00:12:36.063100Z

I’m pretty sure my env defaults to us-west-2

lilactown 2019-01-23T00:13:00.063500Z

it sounds like I need to specify the LocationConstraint but I can’t figure out how to do that with aws/invoke

lilactown 2019-01-23T00:14:26.063700Z

(aws/invoke s3 {:op :CreateBucket :request {:Bucket bucket-name
                                            :LocationConstraint "us-west-2"}})

lilactown 2019-01-23T00:14:30.063900Z

doesn’t seem to work 😕

lilactown 2019-01-23T00:18:39.064200Z

ah:

(aws/invoke s3-client {:op :CreateBucket :request {:Bucket "my-unique-bucket-name"
                                                   :CreateBucketConfiguration {:LocationConstraint "us-west-2"}}})
found in https://github.com/cognitect-labs/aws-api/pull/28/files >_<

lilactown 2019-01-23T00:19:15.064500Z

is there a place where I should have seen that in the docs?