-
Notifications
You must be signed in to change notification settings - Fork 421
Feature Request: Update some outdated Cognito user pool event data classes #3987
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hey @knightmre! Thanks for raising this issue. You're correct that the field
This is truly a significant improvement! Your contribution in identifying any discrepancies between our current implementation and the actual schema used by Cognito during Lambda invocation would be immensely helpful. Please do that! I've reclassified this issue as a Feature Request. Please feel free to reach out if you have any obstacles during the contribution process. |
Hi @knightmre! I hope things are going well there. Do you have any updates on this? Thanks |
Hi @leandrodamascena I've submitted the PR, sorry this change took so long. |
no worries <3 and thank you for the contrib. We're looking to make a release next Thursday (we're setting a goal to release again every other Thursday) -- hopefully we can finish it on time ;) |
|
Expected Behavior
Accessing code_parameter property of cognito_user_pool_event.CustomMessageTriggerEvent returns the proper encrypted code.
Current Behaviour
Mapping the CustomMessageTriggerEvent data class of cognito_user_pool_event leads to a KeyError because the received event property names have been changed by AWS.
The new request and documentation can be found at : https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html#custom-sms-sender-parameters
Code snippet
Possible Solution
Update data class source for cognito_user_pool_event to reflect the updated event. Currently it fetches
event['request']['code_parameter']
but it should fetchevent['request']['code']
If that's OK I could contribute, I'd be glad to go through all the source events for Cognito as I see it's been quite a while since they have been added to the project. I could go through the current AWS docs and test it with existing Cognito Pool event behavior for all the events as we rely heavily on those in our current project.
For now I've recreated the event class in our local code, deriving
BaseTriggerEvent
.Steps to Reproduce
This is the event trigger that is sent by Cognito that can be used as an input to the lambda handler.
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: