Skip to content

Add ReplayName to CloudWatchEvent - #652

Open
alessandrolattao wants to merge 1 commit into
aws:mainfrom
alessandrolattao:add-replay-name-to-cloudwatch-event
Open

alessandrolattao wants to merge 1 commit into
aws:mainfrom
alessandrolattao:add-replay-name-to-cloudwatch-event

Conversation

@alessandrolattao

Copy link
Copy Markdown

Issue #651

Description of changes:
EventBridge adds a replay-name field to every event it replays from an archive. CloudWatchEvent (and its alias EventBridgeEvent) has no field for it, so a Go handler cannot tell a replayed event from a live one without decoding the envelope itself. This adds ReplayName, empty on a live delivery. The field is omitempty, so an event that was not replayed marshals to the same JSON as before.

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

References

  • Identifying events that have been replayed, EventBridge user guide
  • The same field in other runtimes: @types/aws-lambda (EventBridgeEvent["replay-name"]), Powertools for AWS Lambda Python (EventBridgeEvent.replay_name) and TypeScript (EventBridgeSchema)

EventBridge adds a replay-name field to every event it replays from an
archive. CloudWatchEvent had no field for it, so a handler could not tell
a replayed event from a live one. The field is omitempty, so an event that
was not replayed marshals to the same JSON as before.

Fixes aws#651
@codecov-commenter

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.04%. Comparing base (4111853) to head (16fde0e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #652   +/-   ##
=======================================
  Coverage   82.04%   82.04%           
=======================================
  Files          37       37           
  Lines        1487     1487           
=======================================
  Hits         1220     1220           
  Misses        264      264           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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