AWS S3 Error – InvalidLocationConstraint – “The specified location-constraint is not valid”

This error is returned when trying to create a S3 bucket using the location parameter and the value passed is not valid.
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidLocationConstraint</Code>
<Message>The specified location-constraint is not valid</Message>
<LocationConstraint>Default</LocationConstraint>
<RequestId>E1BDC3B868D40B32</RequestId>
<HostId>
t47dkcB6eVf0GW9mEtpECy3x6V6JFaJ8MeWhNynwVwMhJZ4yS9lwEXeQRP2wgz0OZq0X0NuM5oo=
</HostId>
</Error>
The valid list of locations as documented here is below:
Valid Values:
  • us-west-1
  • us-west-2
  • EU or eu-west-1
  • eu-central-1
  • ap-south-1
  • ap-southeast-1
  • ap-southeast-2
  • ap-northeast-1
  • ap-northeast-2
  • sa-east-1
  • empty string (for the US East (N. Virginia) region)
  • us-east-2
Advertisement