Bird
Raised Fist0
HLDsystem_design~20 mins

Blob storage (S3, Azure Blob) in HLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Blob Storage Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Architecture
intermediate
2:00remaining
Choosing the right storage tier for cost optimization

You have a blob storage bucket that stores user-uploaded photos. Most photos are accessed frequently for the first week, then rarely afterwards. Which storage tier choice best balances cost and access speed?

AStore photos in the hot tier for the first week, then move them to the cool or archive tier.
BStore photos in the cool tier immediately after upload to save cost.
CStore all photos in the hot tier to ensure fast access at all times.
DStore photos in the archive tier immediately to minimize storage cost.
Attempts:
2 left
💡 Hint

Think about how access frequency changes over time and how storage tiers differ in cost and speed.

❓ service_behavior
intermediate
2:00remaining
Understanding eventual consistency in S3

You overwrite an existing file in an Amazon S3 bucket and immediately try to read it from another client. Sometimes the old version is returned. What explains this behavior?

AS3 uses eventual consistency for read-after-write of new objects in all regions.
BS3 uses eventual consistency for overwrite PUTs and DELETEs, but read-after-write consistency for new objects in most regions.
CS3 provides read-after-write consistency for new objects in all regions, so this should never happen.
DS3 requires manual replication to make new objects visible to all clients.
Attempts:
2 left
💡 Hint

Consider the difference between new object creation and overwriting existing objects.

❓ security
advanced
2:00remaining
Securing Azure Blob Storage with least privilege

You want to allow an application to upload files to a specific container in Azure Blob Storage without giving full storage account access. Which approach follows the least privilege principle?

AGenerate a shared access signature (SAS) token scoped to the container with write permissions and limited expiry time.
BShare the storage account access key with the application for full access.
CMake the container public so the application can upload files without authentication.
DAssign the Storage Blob Data Contributor role at the storage account level to the application identity.
Attempts:
2 left
💡 Hint

Think about granting only the permissions needed and for a limited time.

❓ Configuration
advanced
2:00remaining
Configuring S3 bucket for static website hosting

You want to host a static website using an Amazon S3 bucket. Which configuration is required to serve the website correctly?

ASet the bucket policy to deny all public access.
BEnable versioning on the bucket and upload an index.html file.
CEnable static website hosting on the bucket and set the index document name.
DCreate a lifecycle rule to archive old website files.
Attempts:
2 left
💡 Hint

Think about what S3 needs to serve files as a website.

✅ Best Practice
expert
3:00remaining
Designing multi-region disaster recovery for blob storage

Your company requires a disaster recovery plan for blob storage that ensures data durability and availability even if one cloud region fails. Which design best meets this requirement?

AManually copy blobs daily from the primary region to a secondary region using scripts.
BStore data only in one region and rely on backups stored on-premises.
CUse locally redundant storage (LRS) to keep multiple copies within the same region.
DUse geo-redundant storage (GRS) or read-access geo-redundant storage (RA-GRS) to replicate data asynchronously to a secondary region.
Attempts:
2 left
💡 Hint

Consider built-in replication options that provide automatic failover or read access.

Practice

(1/5)
1. What is the main purpose of blob storage services like Amazon S3 or Azure Blob Storage?
easy
A. To manage user identities and permissions
B. To run virtual machines in the cloud
C. To store large files safely and accessibly in the cloud
D. To host websites directly without any storage

Solution

  1. Step 1: Understand blob storage function

    Blob storage is designed to save large files like videos, images, and backups in the cloud.
  2. Step 2: Compare with other cloud services

    Other services like virtual machines or identity management serve different purposes, not file storage.
  3. Final Answer:

    To store large files safely and accessibly in the cloud -> Option C
  4. Quick Check:

    Blob storage = large file storage [OK]
Hint: Blob storage is for big files, not computing or identity [OK]
Common Mistakes:
  • Confusing blob storage with compute services
  • Thinking blob storage manages users
  • Assuming blob storage hosts websites directly
2. Which of the following is the correct way to specify a bucket name in Amazon S3?
easy
A. My.bucket.name
B. MyBucketName!
C. my_bucket_name
D. my-bucket-name

Solution

  1. Step 1: Review S3 bucket naming rules

    S3 bucket names must be lowercase, can include hyphens, but no underscores or special characters like '!'.
  2. Step 2: Check each option

    my-bucket-name uses lowercase letters and hyphens, which is valid. Options A, B, and C are invalid: A has uppercase letters and dots, B has uppercase and '!', C has underscores.
  3. Final Answer:

    my-bucket-name -> Option D
  4. Quick Check:

    Bucket names use lowercase and hyphens [OK]
Hint: Bucket names: lowercase letters and hyphens only [OK]
Common Mistakes:
  • Using uppercase letters in bucket names
  • Including underscores or special characters
  • Using dots in bucket names
3. Given this AWS CLI command:
aws s3 cp file.txt s3://my-bucket/ --storage-class STANDARD_IA
What does the --storage-class STANDARD_IA option do?
medium
A. Uploads the file to a cheaper, infrequently accessed storage tier
B. Encrypts the file automatically during upload
C. Makes the file publicly accessible
D. Uploads the file with maximum redundancy across regions

Solution

  1. Step 1: Understand storage classes in S3

    STANDARD_IA means Standard-Infrequent Access, a cheaper tier for files accessed less often.
  2. Step 2: Analyze command effect

    The command uploads file.txt to the bucket using this storage class, saving cost for infrequent access.
  3. Final Answer:

    Uploads the file to a cheaper, infrequently accessed storage tier -> Option A
  4. Quick Check:

    STANDARD_IA = cheaper, infrequent access [OK]
Hint: STANDARD_IA means cheaper storage for rare access [OK]
Common Mistakes:
  • Thinking it encrypts the file
  • Assuming it makes file public
  • Confusing with multi-region redundancy
4. You try to upload a file to Azure Blob Storage but get an error saying the container name is invalid. Which of these is the most likely cause?
medium
A. The container name contains uppercase letters
B. The file size is too large
C. The storage account is in the wrong region
D. The file name has spaces

Solution

  1. Step 1: Recall Azure container naming rules

    Container names must be lowercase letters and numbers only, no uppercase letters allowed.
  2. Step 2: Match error cause

    An invalid container name error usually means the name breaks these rules, such as having uppercase letters.
  3. Final Answer:

    The container name contains uppercase letters -> Option A
  4. Quick Check:

    Azure container names must be lowercase [OK]
Hint: Azure containers must be lowercase, no uppercase letters [OK]
Common Mistakes:
  • Blaming file size for container name errors
  • Confusing region with naming rules
  • Thinking file name affects container name
5. You want to store backup files in Amazon S3 with minimal cost but still need quick access sometimes. Which combination of settings is best?
hard
A. Use STANDARD storage class and enable public access for easy retrieval
B. Use STANDARD_IA storage class with lifecycle rule to move files to GLACIER after 30 days
C. Use GLACIER storage class for all files with no lifecycle rules
D. Use REDUCED_REDUNDANCY storage class and no lifecycle rules

Solution

  1. Step 1: Understand storage classes and lifecycle

    STANDARD_IA offers cheaper storage with quick access. GLACIER is very cheap but slow to retrieve.
  2. Step 2: Analyze cost and access needs

    Using STANDARD_IA first allows quick access. Moving to GLACIER after 30 days saves cost for older backups.
  3. Step 3: Evaluate other options

    GLACIER only delays access too much. STANDARD is costly. REDUCED_REDUNDANCY is deprecated and less reliable.
  4. Final Answer:

    Use STANDARD_IA storage class with lifecycle rule to move files to GLACIER after 30 days -> Option B
  5. Quick Check:

    STANDARD_IA + lifecycle to GLACIER = cost + access balance [OK]
Hint: Start with STANDARD_IA, then archive to GLACIER for cost savings [OK]
Common Mistakes:
  • Choosing GLACIER only and ignoring access speed
  • Enabling public access unnecessarily
  • Using deprecated REDUCED_REDUNDANCY class
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard