feat(parser): add model for the DynamoDB Stream Lambda invocation record#7818
Merged
leandrodamascena merged 2 commits intoaws-powertools:developfrom Dec 16, 2025
Conversation
2 tasks
|
Thank you for creating this issue and the accompanying PR! We will review your PR shortly. |
svozza
reviewed
Dec 16, 2025
This commit adds a model for the invocation record that a Lambda with a DynamoDB event source sends to a SNS, SQS or S3 destination for failed invocations. The record format is described in https://docs.aws.amazon.com/lambda/latest/dg/services-dynamodb-errors.html The model can be used in the handler of a lambda that processes failed invocations from SNS or SQS by combining it with the source envelope model, e.g., from aws_lambda_powertools.utilities.parser import envelopes, event_parser from aws_lambda_powertools.utilities.parser.models import DynamoDBStreamLambdaOnFailureDestinationModel @event_parser(model=DynamoDBStreamLambdaOnFailureDestinationModel, envelope=envelopes.SqsEnvelope) def lambda_handler(event: list[DynamoDBStreamLambdaOnFailureDestinationModel], context: LambdaContext): ...
d7e1c79 to
c686394
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7818 +/- ##
===========================================
+ Coverage 96.49% 96.53% +0.03%
===========================================
Files 275 275
Lines 13123 13151 +28
Branches 990 990
===========================================
+ Hits 12663 12695 +32
+ Misses 355 353 -2
+ Partials 105 103 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.

Issue number: closes #7817
Summary
Data model for DynamoDB Stream Lambda Invocation records
Changes
This commit adds a model for the invocation record that a Lambda with a DynamoDB event source sends to a SNS, SQS or S3 destination for failed invocations. The record format is described in
https://docs.aws.amazon.com/lambda/latest/dg/services-dynamodb-errors.html
The model can be used in the handler of a lambda that processes failed invocations from SNS or SQS by combining it with the source envelope model, e.g.,
User experience
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.