Adityacprtm
Aditya Pratama
DevOps Cloud Engineer
Availability
Available for projects

Replies within 24h

Back to Portfolio
Serverless Web App

Serverless Web App

Solo Developer2021 · 1 week

Serverless AWS contact form: Lambda + API Gateway + SES + reCAPTCHA v3, provisioned with Terraform. Zero servers, ~$0/month, IaC-driven - full walkthrough with code.

Tech Stack

AWS LambdaAmazon API GatewayAmazon SESGoogle reCAPTCHATerraform

Architecture

A static HTML form hosted on S3 behind CloudFront sends POST requests to API Gateway, which triggers a Lambda function. The Lambda validates the reCAPTCHA v3 token, sanitizes the input, and forwards the message via SES. Terraform manages the entire infrastructure as code, including IAM roles, API Gateway routes, and Lambda environment variables.

Challenges & Solutions

Cold Start Latency on Lambda

The first invocation after a period of inactivity could take over 2 seconds due to the cold start. Provisioned Concurrency was considered but ultimately avoided to keep costs at zero. The contact form use case was latency-tolerant, so this was acceptable.

IAM Least Privilege Without Overcomplication

Crafting a minimal IAM policy that allowed SES send operations without granting broad permissions required careful reading of the AWS documentation. The final policy restricted actions to ses:SendEmail and ses:SendRawEmail on a specific verified identity.

© 2026 Aditya Chamim PratamaContact