Skip to content

Commit 5a0d7b7

Browse files
authored
💸 cost: Adds S3 transition to one zone IA to save pennies (#11)
1 parent 7f78a6a commit 5a0d7b7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎aws-s3.tf‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,19 @@ data "aws_iam_policy_document" "cloudfront_s3_origin" {
4040
}
4141
}
4242
}
43+
44+
resource "aws_s3_bucket_lifecycle_configuration" "example" {
45+
bucket = module.s3_site.s3_bucket_id
46+
47+
rule {
48+
id = "rule-1"
49+
status = "Enabled"
50+
transition {
51+
storage_class = "ONEZONE_IA"
52+
days = 30
53+
}
54+
abort_incomplete_multipart_upload {
55+
days_after_initiation = 1
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)