tl;dr: for CodeArtifact.PublishPackageVersion the pre-computed hash is used in the header but aws-chunked encoding is also activated - the two are incompatible.
Results in invalid signature exceptions.
The issue may occur for any other API call that explicitly sets x-amz-content-sha256.
Expected Behavior
Signatures are calculated correctly / request headers are correctly populated; uploading CodeArtifact assets via PublishPackageVersion does not receive an invalid signature exception.
Current Behavior
Invalid signature exception received from CodeArtifact service (details in linked ticket)
Steps to Reproduce
Repro steps in linked ticket. tl;dr: call CodeArtifact.PublishPackageVersion for a generic artifact of sufficient size to be chunked (>16k).
Possible Solution
Details in linked ticket.
tl;dr: adjust signing logic to use pre-computed hash / bypass auto-detection of chunked encoding.
Context
Unable to use CodeArtifact.PublishPackageVersion from Kotlin SDK for assets > 16k.
Describe the bug
Details are in Kotlin SDK ticket.
tl;dr: for CodeArtifact.PublishPackageVersion the pre-computed hash is used in the header but aws-chunked encoding is also activated - the two are incompatible.
Results in invalid signature exceptions.
The issue may occur for any other API call that explicitly sets
x-amz-content-sha256
.Expected Behavior
Signatures are calculated correctly / request headers are correctly populated; uploading CodeArtifact assets via PublishPackageVersion does not receive an invalid signature exception.
Current Behavior
Invalid signature exception received from CodeArtifact service (details in linked ticket)
Steps to Reproduce
Repro steps in linked ticket. tl;dr: call CodeArtifact.PublishPackageVersion for a generic artifact of sufficient size to be chunked (>16k).
Possible Solution
Details in linked ticket. tl;dr: adjust signing logic to use pre-computed hash / bypass auto-detection of chunked encoding.
Context
Unable to use CodeArtifact.PublishPackageVersion from Kotlin SDK for assets > 16k.
Your Environment
AWS Kotlin SDK 1.0.57 Java 17 MacOS Sonoma