Bird
0
0

You want to automate bucket creation with encryption enabled by default. Which AWS CLI command snippet correctly creates a bucket with default encryption enabled?

hard📝 Application Q9 of 15
AWS - S3 Fundamentals
You want to automate bucket creation with encryption enabled by default. Which AWS CLI command snippet correctly creates a bucket with default encryption enabled?
Aaws s3api create-bucket --bucket secure-bucket --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-2 --encryption AES256
Baws s3api create-bucket --bucket secure-bucket --region us-west-2 --encryption AES256
Caws s3api create-bucket --bucket secure-bucket --region us-west-2 --default-encryption AES256
Daws s3api create-bucket --bucket secure-bucket --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-2 && aws s3api put-bucket-encryption --bucket secure-bucket --server-side-encryption-configuration '{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"AES256"}}]}'
Step-by-Step Solution
Solution:
  1. Step 1: Create bucket with correct region and LocationConstraint

    Command creates bucket in us-west-2 with proper LocationConstraint.
  2. Step 2: Apply default encryption using put-bucket-encryption

    Encryption must be set with a separate command specifying SSEAlgorithm.
  3. Final Answer:

    Use create-bucket then put-bucket-encryption with JSON config -> Option D
  4. Quick Check:

    Encryption requires separate put-bucket-encryption command = A [OK]
Quick Trick: Enable encryption after bucket creation with put-bucket-encryption [OK]
Common Mistakes:
MISTAKES
  • Trying to set encryption during bucket creation
  • Using invalid encryption parameters
  • Omitting LocationConstraint for region

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes