0
0
AWScloud~20 mins

Uploading and downloading objects in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
S3 Upload & Download Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when you upload an object with the same key to an S3 bucket?

You upload a file named report.pdf to an Amazon S3 bucket. Later, you upload another file with the same name report.pdf to the same bucket. What is the result?

AThe bucket creates a version of the file but keeps both accessible by default.
BThe upload fails with an error because the key already exists.
CThe new file overwrites the existing file with the same key.
DBoth files are stored separately with different keys automatically.
Attempts:
2 left
💡 Hint

Think about how S3 handles object keys and overwriting.

Configuration
intermediate
2:00remaining
Which AWS CLI command downloads an object from S3 to your local machine?

You want to download the file image.png from the S3 bucket my-bucket to your current local directory using AWS CLI. Which command is correct?

Aaws s3 get-object my-bucket image.png ./
Baws s3 download s3://my-bucket/image.png ./
Caws s3 fetch s3://my-bucket/image.png ./
Daws s3 cp s3://my-bucket/image.png ./
Attempts:
2 left
💡 Hint

Look for the AWS CLI command that copies files between S3 and local.

Architecture
advanced
3:00remaining
How to design a secure upload system for user files to S3 with minimal permissions?

You want users to upload files directly to an S3 bucket without exposing your AWS credentials or giving full bucket access. Which approach is best?

AGenerate pre-signed URLs for upload with limited time and permissions.
BGive users IAM user credentials with full S3 bucket access.
CAllow public write access on the S3 bucket so users can upload freely.
DUse AWS Lambda to upload files on behalf of users with admin permissions.
Attempts:
2 left
💡 Hint

Think about temporary, limited access for uploads without exposing credentials.

security
advanced
3:00remaining
What is the effect of enabling S3 bucket versioning on object uploads and deletions?

You enable versioning on an S3 bucket. What happens when you upload a new object with the same key or delete an object?

ANew uploads overwrite existing objects; deletions permanently remove the object.
BNew uploads create new versions; deletions add a delete marker without removing versions.
CNew uploads fail if the key exists; deletions are disabled.
DNew uploads create copies with different keys; deletions archive the object.
Attempts:
2 left
💡 Hint

Consider how versioning preserves object history.

Best Practice
expert
4:00remaining
Which method optimizes large file uploads to S3 for reliability and performance?

You need to upload a 10 GB video file to S3. Which method is best to ensure efficient upload and recovery from failures?

AUse multipart upload to upload parts in parallel and retry failed parts.
BUpload the entire file in a single <code>put-object</code> request.
CSplit the file manually and upload each part as a separate object.
DCompress the file and upload it using the AWS CLI <code>sync</code> command.
Attempts:
2 left
💡 Hint

Think about handling large files and network interruptions.