In several cases I need to configure lifecycle rules for automatic expiration of objects in a S3 bucket. For example to clean temporary file uploads after one day.
Proposed Solution
let bucket = new cloud.Bucket(rules: [{
"id" => "deleteFileUploads",
"filter" => ["prefix" => "tmp/"],
"expiration" => ["days" => 7],
}]);
Use Case
In several cases I need to configure lifecycle rules for automatic expiration of objects in a S3 bucket. For example to clean temporary file uploads after one day.
Proposed Solution
Terraform API: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration
Implementation Notes
No response
Component
Compiler
Community Notes