fix(vendor): add AwsGeneratedTags to S3Bucket for S3 eventVersion 2.5 compatibility - #485
Open
obs-gh-justindaines wants to merge 1 commit into
Open
fix(vendor): add AwsGeneratedTags to S3Bucket for S3 eventVersion 2.5 compatibility#485obs-gh-justindaines wants to merge 1 commit into
obs-gh-justindaines wants to merge 1 commit into
Conversation
…mpatibility AWS shipped "system-generated tags in S3 Event Notifications" on Jul 16, 2026. S3 now includes an awsGeneratedTags field in the s3.bucket object for CloudFormation-managed buckets (eventVersion 2.5). The vendored aws-lambda-go S3Bucket struct was missing this field. Although the forwarder's SQS/SNS path uses plain json.Unmarshal (which ignores unknown fields), the struct is now complete and a regression test covers the full SNS-wrapped S3 v2.5 notification path. Fixes: OBSSD-4911 .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
obs-gh-justindaines
requested review from
obs-gh-mattcotter and
sfc-gh-vramakrishnan
July 27, 2026 10:37
Contributor
There was a problem hiding this comment.
These vendored files are supposed to mirror our dependencies. Since the upstream aws/aws-lambda-go hasn't added this yet, then the next time someone runs go work vendor this will be lost. I think we should either:
- wait for this to get this merged/released upstream (looks like there is a PR for this here: fix(s3event): Add missing awsGeneratedTags field. aws/aws-lambda-go#635)
- reference the branch with the fix in our go mod file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
awsGeneratedTagsfield to thes3.bucketobject for CloudFormation-managed buckets (eventVersion 2.5)aws-lambda-goS3Bucketstruct was missing this field — upstreamaws/aws-lambda-gohas not yet added it eitherAwsGeneratedTags map[string]string \json:"awsGeneratedTags,omitempty"`toS3Bucket` in the vendored events packageTestObjectCreatedcovering the full SQS→SNS→S3 v2.5 path withawsGeneratedTagspresentNote: The forwarder's SQS/SNS code path uses plain
json.Unmarshal(not strict mode), so this was not causing a runtime error in aws-sam-apps. This is a struct completeness fix and regression guard. The runtime bug affecting customers is in the private observer Lambda (tracked via OBSSD-4911).Test plan
go test ./pkg/handler/forwarder/... -run TestObjectCreated— all 5 cases pass (including new case 4)awsGeneratedTagsfield is correctly parsed from an SNS-wrapped S3 v2.5 event body.... Generated with Cortex Code