-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 s3api create-bucket throws error for us-east-2 #2603
Comments
Even though I used LocationConstraint but ended up getting exceptions , checking details of parameter suggest we have finite list for location. I can use AWS web console to create bucket with region as us-east-2 but can't create bucket through awscli create-bucket even after using locationconstraint with region as us-east-2. { mb seems to be alternate method and going to try that but awscli create-bucket should fix this inconsistency. |
Bump. Facing same problem with duplicity / boto here... (eu-central-1)
If I create the Bucket manually everything is working fine... Please have a look at your log files... |
I fixed it in Boto3:
|
For those of you looking to create a bucket via the CLI, run this: aws s3api create-bucket --bucket my-bucket-name --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-2 |
Posting this here for posterity. Bucket names are GLOBALLY unique! AWS CLI will give you the |
@thetomasz I can't believe my luck that you posted this 21 hours before I had exactly the same issue. Thank you so much; this was exactly my problem. |
the following doesnt work for me: error: |
@thetomasz thank you so much for your post! I wish I had first seen your post before finally figured this out myself. The message is truly confusing, even misleading. To find out if a name is already taken and figure out which region, if it's indeed taken, the bucket is located in, look at the DNS record of the name "your-bucket-name.s3.amazonaws.com". For example:
|
Well this explains why my bucket name of "testbucket" wouldn't go through ;) Thanks guys. |
I had the same issue. Using |
I just encountered this bug, myself. Come on AWS. Fix it. If the error is a global naming collision, then say so. |
I get this error when I do Put Bucket encryption in my lambda script. Can someone help An error occurred (IllegalLocationConstraintException) when calling the PutBucketEncryption operation: The ap-east-1 location constraint is incompatible for the region specific endpoint this request was sent to.: ClientError |
worked for me |
For everyone trying to create the bucket in us-east-1 just change the --region us-east-2 and it created perfectly and was visible in my aws console. |
Even its worked for me after passing """"--create-bucket-configuration LocationConstraint=us-west-2"""' parameter options aws s3api create-bucket --bucket my-bucket-name --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-2 |
S3 bucket creation for regions other than us-east-1 needs additional LocationConstraint configuration. However this must not be set when the region is us-east-1. Details can be found here[1] [1] aws/aws-cli#2603 Bug: Issue 13095 Change-Id: I3d4fc5a6e8ec536001aec22c8d0e36c17523bb87
…et configuration on mock s3 create_bucket call Summary: Fixes s3_test.py. Used to fail with ``` 2) torchx.aws.test.s3_test.S3Test: test_storage_provider_file 1) AssertionError: File "torchx/aws/test/s3_test.py", line 41, in test_storage_provider_file init_plugin(None) File "torchx/aws/s3.py", line 91, in init_plugin register_storage_provider(S3(boto3.Session())) File "torchx/runtime/storage.py", line 58, in register_storage_provider assert provider.SCHEME not in _PROVIDERS ``` because the test has side-effects when setting the global `_PROVIDERS`. Also for regions other than `us-east-1` location constraint must be set on create-bucket call. See: aws/aws-cli#2603 Reviewed By: tierex Differential Revision: D28499845 fbshipit-source-id: 6dfae7ac06930ff83bc7639cfeeef6f30ddc82ed
@dapseen thanks your solution works for me though I had extra parameter since I want to make the bucket to be publicly readable and writeable for learning purpose then also pass profile name parameter.
|
I had to add Why is this necessary? Seems like a pointless parameter, poor customer experience. |
@pcgeek86, thanks for the comment. Unfortunately this command is calling the S3 API directly and this requirement comes from there - you can see the same signature in the S3 https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html#API_CreateBucket_RequestSyntax The AWS CLI provides the |
That's odd. The New-S3Bucket -BucketName (New-Guid).Guid -Region us-west-2 |
Looks like they have some logic to do it too, @pcgeek86! |
thanks a lot! brilliant suggestion. |
aws s3api create-bucket --bucket dev-xxxx-com-state --region us-east-2
A client error (IllegalLocationConstraintException) occurred when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
Works fine with us-east-1.
aws --version
aws-cli/1.7.45 Python/2.7.10 Darwin/16.5.0
The text was updated successfully, but these errors were encountered: