Skip to content

fix(s3,lambda): checksum integrity, bucket-name + config validation (bug-hunt)#2279

Merged
vieiralucas merged 3 commits into
mainfrom
bh-s3lambda
Jul 15, 2026
Merged

fix(s3,lambda): checksum integrity, bucket-name + config validation (bug-hunt)#2279
vieiralucas merged 3 commits into
mainfrom
bh-s3lambda

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Bug-hunt findings 1.13–1.17.

S3

  • PutObject verifies every supplied x-amz-checksum-<algo> header against the checksum computed over the received body; mismatch → BadDigest. Previously computed but never compared (silent corrupt upload). (1.13)
  • is_valid_bucket_name rejects underscores, adjacent .., IPv4-format names, and reserved prefixes/suffixes per AWS general-purpose rules. (1.14)

Lambda

  • CreateFunction now validates MemorySize/Timeout/Runtime; Create+UpdateFunctionConfiguration use the Smithy Timeout max (5400) not i64::MAX. (1.15)
  • Put{Function,Provisioned}Concurrency + PutFunctionScalingConfig return ResourceNotFoundException for a missing function instead of a ghost config. (1.16)
  • Scaling config keyed per-qualifier (function:qualifier); versions/aliases no longer collide. (1.17)

Test plan

  • s3 unit: valid_bucket_names extended (underscore/../IPv4/reserved).
  • e2e: s3_put_object_rejects_checksum_mismatch, lambda_create_function_validates_timeout_upper_bound, lambda_put_concurrency_on_missing_function_is_not_found.

Surface

No new API surface (validation fixes to existing ops) → no SDK/docs/website/metadata change.


Summary by cubic

Fixes silent S3 upload corruption and tightens bucket-name rules, and aligns Lambda validations and scaling config behavior with AWS to prevent ghost configs and invalid inputs. No API changes.

  • Bug Fixes
    • S3 PutObject: verify all provided x-amz-checksum-<algo> headers against the computed checksum; mismatch returns BadDigest.
    • S3 bucket names: reject underscores, adjacent .., IPv4-like names, and reserved prefixes/suffixes (xn--, sthree-, amzn-s3-demo-, -s3alias, --ol-s3, .mrap).
    • Lambda CreateFunction/UpdateFunctionConfiguration: validate MemorySize, Timeout (max 5400), Runtime, and field lengths.
    • Lambda PutFunctionConcurrency, PutProvisionedConcurrencyConfig, PutFunctionScalingConfig: return ResourceNotFoundException if the function does not exist.
    • Lambda scaling config: key per-qualifier (function:qualifier) to avoid version/alias collisions.

Written for commit a909020. Summary will update on new commits.

Review in cubic

…bug-hunt)

S3:
- PutObject now verifies every supplied x-amz-checksum-<algo> header against
  the checksum computed over the received body; a mismatch returns BadDigest
  (previously the value was computed but never compared -> corrupt upload
  stored silently). (1.13)
- is_valid_bucket_name rejects underscores, adjacent '..', IPv4-format names,
  and reserved prefixes/suffixes (xn--, sthree-, -s3alias, --ol-s3, .mrap),
  matching AWS general-purpose bucket rules. (1.14)

Lambda:
- CreateFunction now validates MemorySize/Timeout/Runtime; both Create and
  UpdateFunctionConfiguration use the Smithy Timeout max (5400), not i64::MAX. (1.15)
- Put{Function,Provisioned}Concurrency and PutFunctionScalingConfig return
  ResourceNotFoundException when the function doesn't exist instead of storing
  a ghost config. (1.16)
- Scaling config is keyed per-qualifier (function:qualifier); previously all
  versions/aliases collided onto the bare function name. (1.17)

Tests: s3 bucket-name unit cases; e2e checksum-mismatch, Lambda timeout-bound
and missing-function concurrency.

No new API surface (validation fixes to existing ops) -> no SDK/docs/metadata change.
@vieiralucas vieiralucas requested a review from Copilot July 15, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The 1.16 fix makes PutFunctionScalingConfig return ResourceNotFoundException
for a missing function (matching AWS), so the conformance test that relied on
the function not existing now creates it via make_basic_function.
@vieiralucas vieiralucas merged commit 9a61512 into main Jul 15, 2026
156 checks passed
@vieiralucas vieiralucas deleted the bh-s3lambda branch July 15, 2026 20:39
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