CreateBucket operation: IllegalLocationConstraintException

0 votes
I am trying to create a S3 bucket and am getting the following error:

aws s3api create-bucket --bucket niteshdemo --region ap-south-1

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.
Nov 23, 2018 in AWS by Nitesh
• 2,920 points
292 views

1 answer to this question.

0 votes
This error is generated because your location would be something else than Mumbai region.

You must validate your location from AWS Console and then change the region and execute the command it will work.

Hope this helps.
answered Nov 23, 2018 by Namitha

The following command creates a bucket named my-bucket in the ap-south-1 region. Regions outside of us-east-1 require the appropriate LocationConstraint to be specified in order to create the bucket in the desired region:

aws s3api create-bucket --bucket my-bucket --region ap-south-1 --create-bucket-configuration LocationConstraint=ap-south-1

Related Questions In AWS

0 votes
2 answers

CreateBucket operation: InvalidBucketName

Your bucket name cannot contain capital letters. ...READ MORE

answered Jan 27 in AWS by therealrodk
367 views
0 votes
1 answer

Enterprise Cloud operation phase in AWS Migration

Yes @rishab, Enterprise Cloud Operation is a ...READ MORE

answered Jan 18 in AWS by Edureka
• 4,180 points
37 views
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 56,540 points
231 views
0 votes
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 56,540 points
456 views
+1 vote
2 answers
0 votes
1 answer

Error creating Key Pair: You are not authorized to perform this operation

Try adding AmazonEC2FullAccess policy. If you are not sure how ...READ MORE

answered Sep 19, 2018 in AWS by Priyaj
• 56,540 points
324 views