The Storage Pyramid
- S3 Standard / Hot: Frequent access.
- S3 IA (Infrequent Access) / Cool: Rarely accessed but need fast retrieval.
- Glacier / Archive: Long-term storage (cheap, slow retrieval).
Lifecycle Policies in Terraform
We will write code to move logs older than 30 days to Glacier automatically.
hcl resource "aws_s3_bucket_lifecycle_configuration" "example" { rule { id = "archive-old-logs" status = "Enabled" transition { days = 30 storage_class = "GLACIER" } } }