This repository contains examples on how to use Cognito Lambda triggers with AWS Serverless Application Model (SAM). It demonstrates implementing a post sign-up Lambda function that gets automatically triggered when a user confirms their registration in a Cognito User Pool.
If you would like to add anything, ask a question about this, or know something that would be helpful to others, please open a pull request or create an issue.
If you want to learn more, here are some resources:
- I have a repo where this is used in a larger system, which can be found here.
- Checkout the SAM GitHub Repository here or the documentation here.
- Finally, here are some examples of using SAM made by AWS.
The project deploys:
- Cognito User Pool: Handles user authentication with email verification
- Cognito User Pool Client: Allows applications to authenticate users
- Lambda Function: Post sign-up trigger that executes after user confirmation
- CloudWatch Logs: Centralized logging for the Lambda function
- AWS CLI configured with appropriate permissions
- AWS SAM CLI installed
- Python 3.12
- Build the application:
sam build- Deploy to the specific environment on AWS:
sam deploy --config-env=devTo remove all resources:
sam delete --config-env=dev