InvalidLocationConstraint error while creating S3 bucket when the used command is
11,632
Solution 1
Used this command. Remove the location constraint and it worked
aws s3api create-bucket --bucket mytest-bucket
Solution 2
If your region is us-east-1 then you simply run the command without the --location constraint because by default bucket is created in the us-east-1 region
Solution 3
try this u will get now aws s3 mb s3://bucket-name --region us-east-1
Author by
coder
Updated on June 29, 2022Comments
-
coder almost 2 years
An error occurred (InvalidLocationConstraint) when calling the CreateBucket operation: The specified location-constraint is not valid when using the command
aws s3api create-bucket --bucket my-bucket --create-bucket-configuration LocationConstraint=region
-
John Rotenstein over 5 yearsPlease edit your question to include the command you used.
-
jarmod over 5 yearsPlease include a question in your statement ;-)
-
-
CryptoFool over 2 yearsDoes this choice of behavior make any sense to anyone? Why should it matter if your constraint happens to be the default case? Even if there's a reason for this, AWS should fix it in the client code to make this a non issue. This behavior...needing to special case your code for one particular region...makes absolutely no sense.
-
SimonW almost 2 yearsIt sure does not, this is frustrating wasting time on this