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="}
I’m pretty sure my env defaults to us-west-2
it sounds like I need to specify the LocationConstraint
but I can’t figure out how to do that with aws/invoke
(aws/invoke s3 {:op :CreateBucket :request {:Bucket bucket-name
:LocationConstraint "us-west-2"}})
doesn’t seem to work 😕
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
>_<is there a place where I should have seen that in the docs?