aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
[Enhancement] - Include 'Content-MD5' or 'x-amz-sdk-checksum-algorithm' headers when uploading the template file to automatically created CloudFormation S3 bucket which has object lock with default retention enabled
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
Other
### Resource name
_No response_
### Description
Hello team,
Currently if object lock with **default retention** is enabled on the S3 Buckets that are automatically created for storing CloudFormation templates (cf-templates-xxxxxxxxxxx-ap-northeast-1), the uploading of template files via the CloudFormation console fails with the following error:
`"Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters."`
This issue occurs because the CloudFormation console doesn't add required headers when uploading files[1].
```
The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Object Lock. These headers are a way to verify the integrity of your object during upload.
When uploading an object with the Amazon S3 console, S3 automatically adds the Content-MD5 header. You can optionally specify an additional checksum function and checksum value through the console as the x-amz-sdk-checksum-algorithm header. If you use the PutObject API you must specify the Content-MD5 header, the x-amz-sdk-checksum-algorithm header, or both to configure the Object Lock retention period.
```
Having said that, I am opening this enhancement request to support uploading of template files to object lock - default retention parameter enabled CloudFormation buckets directly via the CloudFormation console.
References:
[1] Object Lock considerations - Uploading objects to an Object Lock enabled bucket - https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
### Other Details
_No response_
Contributor guide
Research direction
Start with the issue description and the linked Amazon S3 Object Lock considerations documentation; no repository files, tests, or entry points are named. Done means the CloudFormation console can upload template files to automatically created buckets with default retention enabled without the required-header failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100