Serverless Contact Form Backend
CloudFormation: API Gateway + Lambda + SES contact form handler. CORS configured, honeypot spam field, rate limiting, and input sanitization included.
Serverless Contact Form Backend
Production-ready CloudFormation template that deploys a complete contact form solution on AWS Lambda, API Gateway, and SES. No infrastructure code required — just deploy, verify your SES sender, and start collecting messages.
What's Included
A fully automated CloudFormation stack that provisions: RESTful API endpoint via API Gateway with CORS pre-configured for your domain, Lambda function handling form submission, validation, and SES email delivery, IAM roles with least-privilege SES permissions, API Gateway usage plan with rate limiting (100 requests per day per IP), and example HTML form demonstrating integration patterns.
Developer Experience
Deploy in 2 minutes: run CloudFormation with your recipient email, SES sender email, and allowed origin. The Lambda function validates all fields, sanitizes input to prevent injection attacks, checks a built-in honeypot field to trap bots, and returns proper CORS headers. Example client-side form included — just copy, customize, and deploy.
What You Get
A complete contact form backend that handles validation, spam filtering, rate limiting, and email delivery. Formatted emails land directly in your inbox with sender details, timestamp, and message. Includes error responses for validation failures, rate limit exceeded, and SES errors. CloudFormation parameters let you customize recipient email, sender email, CORS origin, and rate limit threshold without editing templates.
Requirements & Deployment
AWS account with SES access (verify sender email in SES console — takes 60 seconds), domain name for CORS configuration, and familiarity with CloudFormation. Deploy via AWS Console or CLI. Frontend-example HTML form shows fetch() integration pattern. Once deployed, test immediately with the included example form or integrate into your website.