Description
Notice
Users relying on the aws_s3_bucket_lifecycle_configuration
resource should update their provider to v5.86.1 or later and ensure that transition_default_minimum_object_size attribute is explicitly added to their configurations.
Description
In September 2024 Amazon S3 updated the default transition behavior for small objects. Full details can be found here. The Terraform AWS Provider was modified in version 5.70.0 via #39578 to allow for this new behavior and give end users the ability to opt into the legacy behavior if required.
Unfortunately the current implementation of this feature can lead to unexpected results in some specific situations which can lead to object transitions being enabled for smaller objects when not explicitly configured. This can lead to increased and unplanned costs.
This issue arises because of an interaction between the S3 API and the terraform-plugin-sdk upon which this resource is built. This leads to the configuration using the existing setting returned by the AWS API rather than the new default when not explicitly configured. This is an atypical interaction, and not something the terraform-plugin-sdk allows us to handle correctly.
To remediate this we will be reimplementing the aws_s3_bucket_lifecycle_configuration resource using the new terraform-plugin-framework, which allows us the ability to handle this behavior correctly. We expect this to be ready in this week's release.
For more information see this detailed bug report: #41073
References
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html#lifecycle-configuration-constraints
- [Bug]: aws_s3_bucket_lifecycle_configuration should honor the new explicit x-amz-transition-default-minimum-object-size #41073
- r/aws_s3_bucket_lifecycle_configuration: Add
transition_default_minimum_object_size
argument #39578
Affected Resource(s) and/or Data Source(s)
- aws_s3_bucket_lifecycle_configuration