Bird
0
0

You want to create an S3 bucket named my.bucket.name in eu-west-1 region using AWS CLI. Which command will work correctly?

hard📝 Best Practice Q15 of 15
AWS - S3 Fundamentals
You want to create an S3 bucket named my.bucket.name in eu-west-1 region using AWS CLI. Which command will work correctly?
Aaws s3api create-bucket --bucket my.bucket.name --region eu-west-1
Baws s3api create-bucket --bucket my.bucket.name --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1
Caws s3api create-bucket --bucket my.bucket.name --region eu-west-1 --acl public-read
Daws s3 mb s3://my.bucket.name --region eu-west-1
Step-by-Step Solution
Solution:
  1. Step 1: Understand bucket creation with dots in non-us-east-1 regions

    Bucket names with dots require specifying --create-bucket-configuration LocationConstraint for regions other than us-east-1.
  2. Step 2: Analyze each command option

    aws s3api create-bucket --bucket my.bucket.name --region eu-west-1 misses the configuration, so it fails. aws s3api create-bucket --bucket my.bucket.name --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1 correctly includes the LocationConstraint. aws s3api create-bucket --bucket my.bucket.name --region eu-west-1 --acl public-read adds ACL but misses LocationConstraint. aws s3 mb s3://my.bucket.name --region eu-west-1 uses shorthand but lacks configuration for dots.
  3. Final Answer:

    aws s3api create-bucket --bucket my.bucket.name --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1 -> Option B
  4. Quick Check:

    Dots + region ≠ no config; use LocationConstraint [OK]
Quick Trick: Add LocationConstraint for buckets with dots outside us-east-1 [OK]
Common Mistakes:
  • Omitting LocationConstraint for regions with dots
  • Assuming ACL fixes creation errors
  • Using shorthand without config for dots

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes