Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
rafaelgsr opened this issue May 31, 2023 · 3 comments · Fixed by #2349
Closed
2 tasks done

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

rafaelgsr opened this issue May 31, 2023 · 3 comments · Fixed by #2349
Assignees
Labels
feature-request feature request

Comments

@rafaelgsr
Copy link
Contributor

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

@rafaelgsr rafaelgsr added feature-request feature request triage Pending triage from maintainers labels May 31, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented May 31, 2023

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@leandrodamascena leandrodamascena linked a pull request May 31, 2023 that will close this issue
7 tasks
@leandrodamascena leandrodamascena removed the triage Pending triage from maintainers label May 31, 2023
@leandrodamascena leandrodamascena self-assigned this May 31, 2023
@leandrodamascena
Copy link
Contributor

Hello @rafaelgsr! Muito bom 😄

Thanks so much man for working on this. Surely unwrapping such user cases as SNS -> SQS -> Lambda will make users' lives much simpler.
Let's work on getting it merged into next week, okay?

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request
Projects
Status: Shipped
Development

Successfully merging a pull request may close this issue.

2 participants