Copy/upload Failure: InvalidArgument – x-amz-content-sha256 Must Be UNSIGNED-PAYLOAD or STREAMING-AWS4-HMAC-SHA256-PAYLOAD
Applies to
- ONTAP 9
- AWS CLI
- Java
- S3
Issue
Unable to access bucket or during the copy (PutObject) operation using AWS CLI and Java, we are encountering the following error
aws s3 cp ./file.txt s3://your-ontap-bucket-name/file.txt --endpoint-url https://your-ontap-s3-endpoint-urlUpload Failed: An error occurred (InvalidArgument) when calling the PutObject operation: x-amz-content-sha256 must be UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD or a valid sha256 value.Error Message : x-amz-content-sha256 must be UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD or a valid sha256 value.software.amazon.awssdk.services.s3.model.S3Exception: x-amz-content-sha256 must be UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD or a valid sha256 value. (Service: S3, Status Code: 400, Request ID: null) (SDK Attempt Count: 1) at software.amazon.awssdk.services.s3.model.S3Exception$BuilderImpl.build(S3Exception.java:113) at software.amazon.awssdk.services.s3.model.S3Exception$BuilderImpl.build(S3Exception.java:61)