Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InvalidLocationConstraint error while creating S3 bucket when the used command is

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
like image 965
coder Avatar asked Sep 12 '25 18:09

coder


1 Answers

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

like image 149
coder Avatar answered Sep 14 '25 08:09

coder