Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred (IllegalLocationConstraintException) when attempting to run 's3 mb' command

I'm new to using AWS & I'm running into a very persistent 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.

I honestly have no idea why this error pops up. I have given my EC2 instance full access to S3, so I should have the permission to create new buckets in S3.

I ran the command:

aws s3 mb s3://bucket-name

and I kept on running it and getting this same error.

I tried to run this command instead:

aws s3 mb s3://bucket-name --region us-east-1

and I STILL kept on getting this error.

I'm stuck here and I'd appreciate any assistance I can get :)

like image 647
Moataz Abdelraouf Avatar asked Oct 19 '25 20:10

Moataz Abdelraouf


1 Answers

Edit: It was the bucket name. Apparently it has to be unique in the sense that no other bucket can exist with the same name.

like image 51
Moataz Abdelraouf Avatar answered Oct 21 '25 12:10

Moataz Abdelraouf