0
0
AWScloud~20 mins

Buckets and objects concept in AWS - Practice Problems & Coding Challenges

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

You upload a file named report.pdf to an Amazon S3 bucket. The bucket already contains an object with the key report.pdf. What will happen to the existing object?

AThe existing object is overwritten by the new upload.
BThe new object is stored with a different key automatically.
CBoth objects are stored with the same key, creating duplicates.
DThe upload fails with an error because the key already exists.
Attempts:
2 left
💡 Hint

Think about how S3 handles object keys as unique identifiers.

Architecture
intermediate
2:00remaining
How to design a bucket policy to allow read-only access to all objects for anonymous users?

You want to allow anyone on the internet to read objects from your S3 bucket named public-assets without requiring authentication. Which bucket policy snippet correctly grants this permission?

A{ "Effect": "Allow", "Principal": "*", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::public-assets/*" }
B{ "Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::public-assets" }
C{ "Effect": "Deny", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::public-assets/*" }
D{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::public-assets/*" }
Attempts:
2 left
💡 Hint

Focus on the action that allows reading objects and the resource path.

service_behavior
advanced
2:00remaining
What is the behavior of S3 when you delete a versioned object without specifying a version ID?

Your S3 bucket has versioning enabled. You delete an object named data.csv without specifying a version ID. What happens to the object?

AA delete marker is added, making the latest version invisible but older versions remain.
BThe delete operation fails because version ID is required.
CThe latest version is permanently deleted, and older versions remain accessible.
DAll versions of the object are permanently deleted immediately.
Attempts:
2 left
💡 Hint

Consider how versioning handles deletions without version IDs.

security
advanced
2:00remaining
Which S3 bucket configuration prevents public access to all objects regardless of bucket policy?

You want to ensure that no objects in your S3 bucket can be accessed publicly, even if a bucket policy or ACL grants public permissions. Which setting achieves this?

ASet the bucket ACL to 'public-read'.
BRemove all IAM user permissions for the bucket.
CEnable 'Block all public access' in the bucket's Public Access Settings.
DCreate a bucket policy that allows public read access.
Attempts:
2 left
💡 Hint

Think about the global setting that overrides other permissions.

Best Practice
expert
2:00remaining
What is the recommended way to organize objects in a large S3 bucket for efficient performance and cost management?

You have a bucket storing millions of objects. You want to optimize for fast retrieval and cost efficiency. Which approach is best?

ACreate a separate bucket for each object to isolate storage.
BUse prefixes (folder-like paths) to distribute objects evenly and enable lifecycle policies on prefixes.
CStore all objects at the root level without prefixes to simplify access.
DDisable versioning to reduce storage costs regardless of object organization.
Attempts:
2 left
💡 Hint

Think about how S3 handles object keys and lifecycle rules.