Skip to content

New serverless pattern - cognito-lambda-dynamodb #2704

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

Conversation

proton0210
Copy link
Contributor

Description of changes: : New Serverless Pattern

This sample project demonstrates how to create a user in an Amazon Cognito User Pool, then automatically insert that user's details into a DynamoDB table once the user confirms their email. The Post Confirmation Lambda trigger handles the event from Cognito and uses the AWS SDK for JavaScript (v3) to write user data to the DynamoDB table.

Key attributes such as the user's unique ID (sub), email, and optional custom attributes are passed to Lambda, which then processes and persists this data. The table is configured in on-demand capacity mode (Pay Per Request) for cost efficiency and minimal management overhead.

This pattern deploys a Cognito User Pool, a User Pool Client, a DynamoDB table, and a Node.js AWS Lambda function as the trigger

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@proton0210
Copy link
Contributor Author

Hey Team @julianwood @marakere any Update?

@marakere
Copy link
Contributor

Hey Team @julianwood @marakere any Update?

Thank you for the follow-up. I will review the pattern this week

Copy link
Contributor Author

@proton0210 proton0210 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done as asked so

@proton0210
Copy link
Contributor Author

Hey Team @julianwood @marakere any Update?

Updated deletion property for cognito
@proton0210
Copy link
Contributor Author

Hey @marakere I updated as said,thank you for catching this one out!

@julianwood julianwood merged commit 5d3c42b into aws-samples:main May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants