Skip to content

fix(vendor): add AwsGeneratedTags to S3Bucket for S3 eventVersion 2.5 compatibility - #485

Open
obs-gh-justindaines wants to merge 1 commit into
mainfrom
jdaines/fix-s3-eventversion-25
Open

fix(vendor): add AwsGeneratedTags to S3Bucket for S3 eventVersion 2.5 compatibility#485
obs-gh-justindaines wants to merge 1 commit into
mainfrom
jdaines/fix-s3-eventversion-25

Conversation

@obs-gh-justindaines

Copy link
Copy Markdown
Contributor

Summary

  • AWS shipped "system-generated tags in S3 Event Notifications" on Jul 16, 2026, adding an awsGeneratedTags field to the s3.bucket object for CloudFormation-managed buckets (eventVersion 2.5)
  • The vendored aws-lambda-go S3Bucket struct was missing this field — upstream aws/aws-lambda-go has not yet added it either
  • Adds AwsGeneratedTags map[string]string \json:"awsGeneratedTags,omitempty"`toS3Bucket` in the vendored events package
  • Adds a regression test to TestObjectCreated covering the full SQS→SNS→S3 v2.5 path with awsGeneratedTags present

Note: 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)
  • Verified awsGeneratedTags field is correctly parsed from an SNS-wrapped S3 v2.5 event body

.... Generated with Cortex Code

…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>

@orca-security-us orca-security-us Bot 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.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:

  1. 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)
  2. reference the branch with the fix in our go mod file

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