Skip to content

Add MD5 to checksum-algorithm choices for s3 commands#10304

Open
shreyaskommuri wants to merge 1 commit into
aws:developfrom
shreyaskommuri:fix/s3-checksum-md5-support
Open

Add MD5 to checksum-algorithm choices for s3 commands#10304
shreyaskommuri wants to merge 1 commit into
aws:developfrom
shreyaskommuri:fix/s3-checksum-md5-support

Conversation

@shreyaskommuri
Copy link
Copy Markdown

Summary

Fixes #10295. MD5 was missing from the --checksum-algorithm choices list for high-level s3 commands (cp, sync, mv), causing the CLI to reject it with an invalid choice error before the request was even made.

Changes:

  • Add MD5 to the CHECKSUM_ALGORITHM choices in awscli/customizations/s3/subcommands.py
  • Add unit test verifying MD5 is accepted as a valid upload checksum algorithm

Related

A companion fix in botocore registers the Md5Checksum implementation so the checksum is computed correctly at the request layer: boto/botocore#3703

Without that botocore fix, s3api commands would still fail for MD5 — both PRs are needed for a complete fix.

Test plan

  • test_validate_checksum_algorithm_md5_upload passes
  • All existing checksum parameter tests continue to pass

Developed with AI assistance, reviewed and tested by shreyaskommuri

MD5 is a valid checksum algorithm for S3 operations but was missing
from the --checksum-algorithm choices list, causing the CLI to reject
it with an invalid choice error before the request was made.

This change adds MD5 to the accepted choices alongside the other
supported algorithms (CRC32, SHA256, SHA1, etc.).

Companion fix in botocore registers the Md5Checksum implementation
so the checksum is computed correctly at the request layer.

Fixes aws#10295

Generated by AI tools, and reviewed by shreyaskommuri
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.

Unsupported checksum algorithm: md5

1 participant