Beginner LevelCloud Computing (AWS/GCP/Azure)
What is Amazon S3 and how do S3 Storage Classes and Lifecycle Rules work?
❓ Interview Prompt: Explain Amazon S3 object storage, bucket security, storage classes (Standard, IA, Glacier), and automated Lifecycle transitions.
Amazon Simple Storage Service (S3) is an object storage service offering 99.999999999% (11 9s) of data durability.
S3 Storage Classes:
1
S3 Standard: Frequently accessed data (active assets, images). High availability ($99.99\%$).
2
S3 Standard-Infrequent Access (Standard-IA): Lower storage cost, but retrieval fee applies. For data accessed less than once a month.
3
S3 Intelligent-Tiering: Automatically moves objects between frequent and infrequent tiers based on access patterns without operational overhead.
4
S3 Glacier Flexible / Deep Archive: Ultra-low-cost archival storage for compliance logs. Retrieval times range from 1 minute to 12 hours.
Lifecycle Rules:
Automated policies that transition objects to cheaper storage classes (e.g. Standard $\rightarrow$ IA after 30 days $\rightarrow$ Glacier after 90 days) and expire old objects.
Code Implementation Example
hcl
# S3 Bucket with automated Lifecycle rule
resource "aws_s3_bucket_lifecycle_configuration" "bucket_policy" {
bucket = aws_s3_bucket.logs.id
rule {
id = "archive-old-logs"
status = "Enabled"
transition {
days = 30
storage_class = "STANDARD_IA"
}
transition {
days = 90
storage_class = "GLACIER"
}
expiration {
days = 365
}
}
}💡Terraform S3 bucket lifecycle policy transitioning objects to Glacier after 90 days.
🎯 Interview Key Takeaway
S3 Lifecycle rules automate moving data to cheaper storage classes (Standard-IA, Glacier) as objects age.
#S3#Object Storage#Glacier#Lifecycle#Beginner
Back to all Cloud Computing (AWS/GCP/Azure) Questions→