Skip to content

edinstance/aws-sam-cognito-lambdas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS SAM Cognito Lambda Triggers

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.

Contributing and Questions

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.

More Resources

If you want to learn more, here are some resources:

  1. I have a repo where this is used in a larger system, which can be found here.
  2. Checkout the SAM GitHub Repository here or the documentation here.
  3. Finally, here are some examples of using SAM made by AWS.

Architecture

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

Prerequisites

  • AWS CLI configured with appropriate permissions
  • AWS SAM CLI installed
  • Python 3.12

Deployment

  1. Build the application:
sam build
  1. Deploy to the specific environment on AWS:
sam deploy --config-env=dev

Cleanup

To remove all resources:

sam delete --config-env=dev

About

This repository contains examples on how to use Cognito Lambda triggers with AWS Serverless Application Model

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages