Bird
0
0

You need to upload all files and subfolders from your local directory images/ to the S3 bucket archive-bucket, maintaining the directory structure. Which AWS CLI command achieves this?

hard📝 Application Q8 of 15
AWS - S3 Fundamentals
You need to upload all files and subfolders from your local directory images/ to the S3 bucket archive-bucket, maintaining the directory structure. Which AWS CLI command achieves this?
Aaws s3 mv images/ s3://archive-bucket/ --recursive
Baws s3 sync images/ s3://archive-bucket/ --exact-timestamps
Caws s3 cp images/ s3://archive-bucket/ --recursive
Daws s3 cp images/* s3://archive-bucket/ --recursive
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command options

    The aws s3 cp command with --recursive uploads all files and folders preserving structure.
  2. Step 2: Differentiate from other commands

    aws s3 sync also works but is more for syncing changes; mv moves files instead of copying.
  3. Final Answer:

    aws s3 cp images/ s3://archive-bucket/ --recursive -> Option C
  4. Quick Check:

    Use cp with --recursive to upload folders [OK]
Quick Trick: Use 'aws s3 cp' with --recursive for folder uploads [OK]
Common Mistakes:
MISTAKES
  • Using 'mv' which deletes local files
  • Using 'sync' without understanding its behavior
  • Using wildcard '*' which does not recurse into subfolders

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes