AWS Lambda function triggered by SNS to send email verification links via SES when new users register.
- Python 3.12
- AWS CLI configured with appropriate profiles
- Terraform for infrastructure deployment
- User creates account via webapp API
- Webapp publishes message to SNS topic with user details + verification token
- SNS triggers this Lambda function
- Lambda sends verification email via SES
- Lambda tracks sent emails in DynamoDB to prevent duplicates
- User clicks verification link within 1 minute to verify their email
cd src
zip -r ../lambda_function.zip lambda_function.pyInfrastructure is managed via Terraform in the tf-infra repository. The Lambda function zip is referenced by the Terraform configuration.
DYNAMODB_TABLE— DynamoDB table name for tracking sent emailsDOMAIN— Application domain (e.g., dev.shrirangesh.me)FROM_EMAIL— Sender email addressAWS_REGION— AWS region