Bird
0
0

You run this command to delete an S3 bucket:

medium📝 Debug Q14 of 15
AWS - CLI
You run this command to delete an S3 bucket:
aws s3 rb s3://my-bucket

But it fails with an error. What is the most likely cause?
AYou need to use <code>aws s3 rm</code> instead
BThe bucket is not empty
CThe bucket name is invalid
DThe AWS CLI is not installed
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command purpose

    aws s3 rb removes (deletes) an S3 bucket, but only if it is empty.
  2. Step 2: Identify the common error cause

    If the bucket contains files, the command fails. You must delete all objects first.
  3. Final Answer:

    The bucket is not empty -> Option B
  4. Quick Check:

    Bucket must be empty before removal [OK]
Quick Trick: Empty bucket before deleting with 'rb' command [OK]
Common Mistakes:
MISTAKES
  • Trying to delete non-empty bucket directly
  • Confusing 'rm' (remove objects) with 'rb' (remove bucket)
  • Assuming AWS CLI is not installed without checking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes