Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Serverless - Email Verification Lambda

Overview

AWS Lambda function triggered by SNS to send email verification links via SES when new users register.

Prerequisites

  • Python 3.12
  • AWS CLI configured with appropriate profiles
  • Terraform for infrastructure deployment

Architecture

  1. User creates account via webapp API
  2. Webapp publishes message to SNS topic with user details + verification token
  3. SNS triggers this Lambda function
  4. Lambda sends verification email via SES
  5. Lambda tracks sent emails in DynamoDB to prevent duplicates
  6. User clicks verification link within 1 minute to verify their email

Build

cd src
zip -r ../lambda_function.zip lambda_function.py

Deploy

Infrastructure is managed via Terraform in the tf-infra repository. The Lambda function zip is referenced by the Terraform configuration.

Environment Variables

  • DYNAMODB_TABLE — DynamoDB table name for tracking sent emails
  • DOMAIN — Application domain (e.g., dev.shrirangesh.me)
  • FROM_EMAIL — Sender email address
  • AWS_REGION — AWS region

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages