Describe the feature
Currently, managing S3 Bucket Lifecycle rules requires replacing the entire lifecycle configuration at once using the PutBucketLifecycleConfiguration API operation. Because it acts as a monolithic PUT on the ?lifecycle subresource, it is impossible to add, update, or remove a single rule without affecting the others.
Use Case
To modify a single rule today, developers must write a fragile "Read-Modify-Write" loop:
-
GetBucketLifecycleConfiguration
-
Mutate the array of rules in memory
-
PutBucketLifecycleConfiguration
This introduces two major problems:
-
Race Conditions: If two automated processes (or developers) attempt to add a lifecycle rule to the same bucket at the same time, one will overwrite the other's changes.
-
IaC Limitations: Infrastructure-as-Code tools (like Terraform) are forced to manage lifecycle rules as a single, monolithic resource block. This prevents modular infrastructure design where different teams or modules might want to manage their own prefix-specific lifecycle rules on a shared bucket.
Proposed Solution
I would like the S3 service to expose granular API operations for managing individual lifecycle rules, similar to how individual objects or EventBridge rules are managed.
Ideally, this would include:
Alternatively, supporting PATCH semantics on the existing ?lifecycle endpoint to merge new rules into the existing configuration would solve the issue.
Other Information
I recognize that this is a feature request for the upstream S3 Service API rather than a direct issue with the SDK code itself. I am opening it here in hopes that the SDK team can route this feature request internally to the S3 service team for consideration.
Acknowledgements
AWS Go SDK V2 Module Versions Used
release-2026-07-16
Go version used
1.24
Describe the feature
Currently, managing S3 Bucket Lifecycle rules requires replacing the entire lifecycle configuration at once using the PutBucketLifecycleConfiguration API operation. Because it acts as a monolithic PUT on the
?lifecyclesubresource, it is impossible to add, update, or remove a single rule without affecting the others.Use Case
To modify a single rule today, developers must write a fragile "Read-Modify-Write" loop:
GetBucketLifecycleConfigurationMutate the array of rules in memory
PutBucketLifecycleConfigurationThis introduces two major problems:
Race Conditions: If two automated processes (or developers) attempt to add a lifecycle rule to the same bucket at the same time, one will overwrite the other's changes.
IaC Limitations: Infrastructure-as-Code tools (like Terraform) are forced to manage lifecycle rules as a single, monolithic resource block. This prevents modular infrastructure design where different teams or modules might want to manage their own prefix-specific lifecycle rules on a shared bucket.
Proposed Solution
I would like the S3 service to expose granular API operations for managing individual lifecycle rules, similar to how individual objects or EventBridge rules are managed.
Ideally, this would include:
PutBucketLifecycleRule(Upserts a rule by its ID)DeleteBucketLifecycleRule(Deletes a rule by its ID)Alternatively, supporting PATCH semantics on the existing ?lifecycle endpoint to merge new rules into the existing configuration would solve the issue.
Other Information
I recognize that this is a feature request for the upstream S3 Service API rather than a direct issue with the SDK code itself. I am opening it here in hopes that the SDK team can route this feature request internally to the S3 service team for consideration.
Acknowledgements
AWS Go SDK V2 Module Versions Used
release-2026-07-16
Go version used
1.24