Skip to content

fix(parser): fix DynamoDB Stream Lambda invocation record model#8321

Open
exg wants to merge 1 commit into
aws-powertools:developfrom
exg:dynamodb-stream-lambda-invocation-record
Open

fix(parser): fix DynamoDB Stream Lambda invocation record model#8321
exg wants to merge 1 commit into
aws-powertools:developfrom
exg:dynamodb-stream-lambda-invocation-record

Conversation

@exg

@exg exg commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Issue number: closes #8322

Summary

The PR fixes an issue in the DynamoDB Stream Lambda Invocation record data model introduced in #7818.

Changes

The responseContext.functionError field of a DynamoDB Stream Lambda Invocation record is null if the error did not occur during function execution.

User experience

Please share what the user experience looks like before and after this change


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.

The responseContext.functionError field is null if the error did not
occur during function execution.
@exg exg requested a review from a team as a code owner July 3, 2026 12:09
@exg exg requested a review from leandrodamascena July 3, 2026 12:09
@boring-cyborg boring-cyborg Bot added the tests label Jul 3, 2026
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@leandrodamascena leandrodamascena left a comment

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.

Thanks, and you're right the field is optional.

One thing: I'd make it Optional[str] = Field(default=None, ...). On its own Optional[str] accepts an explicit null but still rejects the field being absent, and AWS tends to just drop these fields rather than send null in some cases. The default covers both. A test for the missing field would round it out, then happy to approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: The DynamoDB Stream Lambda invocation record model rejects valid records

2 participants