Repository navigation
feat(data_classes,parser): add EventBridge Custom Event Bus support - #8658
leandrodamascena merged 2 commits into
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
…x optional system metadata, fix doc link
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @Asymtode712, that was quick, and it holds up. I rebuilt a real Custom Event Bus with eight subscriber variants, RAW and WITH_METADATA, batched and single, FIFO with two groups, PutRawEvents with JSON and application/octet-stream, plus a replay subscriber, all delivering to a Lambda running this branch. The data class got every one of them right, including bytes for octet-stream, event_group_id per record and delivery_type="REPLAY" on the replayed batch. The envelope parsed every JSON delivery into the user model.
I pushed three small things so we don't need another round: the doc link now points to eb-custom-bus.html (the old one redirects to the guide root), the envelope decodes Data when it comes as bytes so the JSON path handles it, and the three aws: fields the service doesn't guarantee are optional in the model.
Approving. This goes out in 3.38.0, so it will sit here briefly before I merge it. No rebase needed, and you'll be credited in the release notes.
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8658 +/- ##
===========================================
+ Coverage 96.94% 96.95% +0.01%
===========================================
Files 318 321 +3
Lines 16121 16246 +125
Branches 1445 1453 +8
===========================================
+ Hits 15628 15751 +123
- Misses 352 353 +1
- Partials 141 142 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Issue number: closes #8657
Summary
Changes
Adds support for the payloads delivered by the new Amazon EventBridge Custom Event Bus to Lambda:
EventBridgeV2Eventdata class (records,EventBridgeV2Record,EventBridgeV2SystemMetadata) accepting a single object or an array, WITH_METADATA (Data/Metadata/SystemMetadata) and RAW deliveries (classic envelope, PutEvents array, bare PutRawEvents payload). Exposesdata(bytes forapplication/octet-stream),detail,metadataandsystem_metadata(event_id,sequence_number,delivery_type,event_group_id,deduplication_id,content_type,ingestion_time,source,detail_type).EventBridgeV2Model(single or list, via a root model) for WITH_METADATA payloads.EventBridgeV2Envelopereturning a list with theDataof each record (orData.detailfor PutEvents) parsed into the user model.Partial batch failure / Batch integration is out of scope until the service documents a usable identifier.
User experience
Before:
EventBridgeEvent/EventBridgeModelfail on the Custom Event Bus default delivery (array), WITH_METADATA and PutRawEvents payloads (TypeError,KeyError).After:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.