-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws s3 mb fails due to IllegalLocationConstraintException #3567
Comments
I was able to create the bucket by changing the name. I think this error was thrown because the name was not unique, but the error message was completely misleading. I only found out the name issue by trying to create it via the AWS web console. May want to update this error message |
Thanks for reaching out to us about this @holtc. This error occurs as a result of the AWS CLI getting redirected to the endpoint where the existing bucket was created. After the redirect occurs the request is not updated with the location constraint of the new region, resulting in the location constraint and the S3 endpoint not matching up which in turn causes the IllegalLocationConstraint exception. This behavior is something we are aware of and plan to change, however in the meantime you can override the endpoint URL for the request with --endpoint-url (e.g. |
@diehlaws Your suggestion worked for me. Thank you. |
@diehlaws That workaround worked for me. It'd be nice if the client got fixed soon or at least had a doc pointer in the error message |
Closing this issue as we are tracking the process under issue #3723. It has also been escalated internally to our documentation writers. |
I have also noticed, that if you create bucket with name without extension (bucketname.extension) - it causes the same error |
the answer for @diehlaws worked for me. |
@justnance this issue should be reopened. The title of #3723 doesn't reflect the problem with |
(e.g. |
* fix package regression test cases to remove the new added SAM related metadata. * fix failing windows issue * update ruby version. Ruby v2.5 is not supported any more * update ruby version. Ruby v2.5 is not supported any more * use layer full path to generate the dependency layer
The issue persists as of June 2024. Same deal: non-unique bucket name resulted in this misleading error message. |
When I try to create a bucket from the aws cli, I get an error that I cannot resolve. Any hints? Thanks!
Command:
aws s3 mb s3://bucket-name --region us-east-1
Error:
make_bucket failed: s3:///bucket-name An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
Version:
aws-cli/1.16.14 Python/3.6.6 Darwin/17.6.0 botocore/1.12.4
The text was updated successfully, but these errors were encountered: