Skip to content

Feature request: Add function to decode nested messages on SQS events #2348

Closed
@rafaelgsr

Description

@rafaelgsr

Use case

SQS events can encapsulate events originated in other AWS resources, such as S3 and SNS. When processing a SQSEvent in a Lambda function, a function to decode these nested events - returning the desired data class - would improve the user experience.

Solution/User Experience

@event_source(data_class=SQSEvent)
def lambda_handler(event: SQSEvent, context):
     for record in event.records:
        nested_event: S3Event = record.decode_nested_s3_event

Alternative solutions

No response

Acknowledgment

Metadata

Metadata

Labels

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions