AWS CLI s3api requires –create-bucket-configuration LocationConstraint=us-west-2 otherwise

When creating an S3 bucket with the AWS CLI s3api like:
aws s3api create-bucket –bucket xxxxxredshiftoregon –region us-west-2 –create-bucket-configuration LocationConstraint=us-west-2
If you leave this “–create-bucket-configuration LocationConstraint=us-west-2” clause out you get an error like:

An error occurred (IllegalLocationConstraintException) when calling the CreateBu cket operation: The unspecified location constraint is incompatible for the regi on specific endpoint this request was sent to.

 

Leave a Comment

Scroll to Top