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