Skip to content

Generate flexible checksums for AWS clients - #999

Merged
stobrien89 merged 1 commit into
developfrom
python-client-checksums
Nov 30, 2026
Merged

stobrien89 merged 1 commit into
developfrom
python-client-checksums

Conversation

@stobrien89

Copy link
Copy Markdown
Contributor

Issue #, if available:

Replaces #996, which GitHub marked merged with no changes after a bad force-push.

Description of changes:

Generated AWS clients now add and validate flexible checksums, matching Java's AwsFlexibleChecksumsIntegration. S3 needs this for operations such as PutObject, DeleteObjects and GetObject.

  • A new AwsChecksumsIntegration applies to AWS services whose operations have aws.protocols#httpChecksum.
  • Clients get a checksums module with flexible_checksums_plugin, which adds the runtime's FlexibleChecksumsInterceptor, or AsyncFlexibleChecksumsInterceptor in async clients. The package then needs smithy-aws-core[checksums].
  • Configs get request_checksum_calculation and response_checksum_validation only when an operation uses them, like Java. Both resolve from the environment and profile and default to when_supported.
  • Schemas keep aws.protocols#httpChecksum, which the interceptor reads.

The features fixture gains a request checksum on PutNote and response validation on GetNote. A new snapshot test checks that put_note(checksum_algorithm="SHA256") sends x-amz-checksum-sha256 from both clients.

Note: this doesn't fix the RestJsonHttpChecksumRequired vector. That uses smithy.api#httpChecksumRequired, which the runtime interceptor doesn't handle yet.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89
stobrien89 force-pushed the python-client-checksums branch from 1698b35 to a95ffc0 Compare November 30, 2026 17:56
@stobrien89
stobrien89 merged commit 3f2a34b into develop Nov 30, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants