amazon-web-servicesamazon-s3aws-lambdaaws-cliserverless-application-model

AWS CLI - Create s3 bucket from Linux error


I'm using AWS CLI to create the S3 bucket. I have installed the AWS CLI and running following command to create the bucket

aws s3 mb s3://Test-sam-bucket --region us-west-1

Error: make_bucket failed: s3://Test-sam-bucket An error occurred (InvalidBucketName) when calling the CreateBucket operation: The specified bucket is not valid.

also, I have tried with:

aws s3 mb s3://sambucket --region us-west-1

Error: make_bucket failed: s3://sambucket An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.

What am I doing wrong please help


Solution

  • Regarding the first point where you are taking Test-sam-bucket name:

    Regarding your second point where you are getting the BucketAlreadyExists message: