Skip to content

Feature request: Parser support for custom resource #2295

Closed
@ran-isenberg

Description

@ran-isenberg

Use case

CFN Custom resource can trigger a lambda function with a set of events: create, delete and update.
There's a clear envelope and user payload which makes it a classic candidate for the parser.
I printed the actual events and wrote an event generator for testing purposes in my own application.
here's the gist: https://gist.github.com/ran-isenberg/9a49fad3d607245f7d615696353d1a36

Solution/User Experience

@event_parser(model=UserModel, envelope=envelopes.CustomResourceEnvelope)
def handler(event: UserModel, context: LambdaContext):
    assert event.password1 == event.password2

Alternative solutions

No response

Acknowledgment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions