Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws s3api put-bucket-replication -> Missing required header for this request: Content-MD5 #9215

Closed
1 task done
jplitza opened this issue Jan 16, 2025 · 4 comments
Closed
1 task done
Assignees
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. s3api

Comments

@jplitza
Copy link

jplitza commented Jan 16, 2025

Describe the bug

Calling aws s3api put-bucket-replication --bucket foo --replication-configuration '{...}' returns an error after updating to version 2.23.0 (via snap), while it worked before (with 2.22.35)

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The replication config ist applied to the bucket.

Current Behavior

An error occurred (InvalidRequest) when calling the PutBucketReplication operation: Missing required header for this request: Content-MD5

Reproduction Steps

BUCKET="test-put-replication-config"
aws s3api create-bucket --bucket "$BUCKET"
aws s3api put-bucket-versioning --bucket "$BUCKET" --versioning-configuration Status=Enabled
aws s3api put-bucket-replication --bucket "$BUCKET" --replication-configuration '{"Role":"foo", "Rules":[]}'
aws s3api delete-bucket --bucket "$BUCKET"

Possible Solution

No response

Additional Information/Context

I'm using a 3rd party S3 provider, not Amazon AWS S3.

CLI version used

2.23.0

Environment details (OS name and version, etc.)

Ubuntu 24.04 (installed via snap)

@jplitza jplitza added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 16, 2025
@github-actions github-actions bot added the potential-regression Marking this issue as a potential regression to be checked by team member label Jan 16, 2025
@kdaily kdaily added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jan 16, 2025
@kdaily
Copy link
Member

kdaily commented Jan 16, 2025

Hi @jplitza,

This appears to be caused by the change in AWS CLI 2.23.0 to use a new checksum algorithm by default for S3 operations. The third party S3 provider you are using does not appear to support that change. You can read more about that change in this issue "Announcement: S3 default integrity change":

#9214

You can read more about workarounds using configuration options covered in Data Integrity Protections for Amazon S3.

@kdaily kdaily added closing-soon This issue will automatically close in 4 days unless further comments are made. s3api guidance Question that needs advice or information. and removed bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. potential-regression Marking this issue as a potential regression to be checked by team member labels Jan 16, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK added bug This issue is a bug. p3 This is a minor priority issue labels Jan 16, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Jan 16, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK removed the guidance Question that needs advice or information. label Jan 17, 2025
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jan 20, 2025
@jplitza
Copy link
Author

jplitza commented Jan 21, 2025

@kdaily Setting the request_checksum_calculation and response_checksum_validation settings to WHEN_REQUIRED does not help. Tried it via config file and environment variables.

@RyanFitzSimmonsAK
Copy link
Contributor

@kdaily Setting the request_checksum_calculation and response_checksum_validation settings to WHEN_REQUIRED does not help. Tried it via config file and environment variables.

This is likely due to the behavior described in boto/s3transfer#327. Please try updating to the most recent version of the AWS CLI (or at least a version using s3transfer-0.11.2. The request_checksum_calculation and response_checksum_validation settings should work as intended once you do.

@RyanFitzSimmonsAK RyanFitzSimmonsAK added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jan 28, 2025
Copy link

github-actions bot commented Feb 7, 2025

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. s3api
Projects
None yet
Development

No branches or pull requests

3 participants