Building a Serverless Contact Form API with AWS Lambda, SES, Bedrock, and Terraform

When someone fills out a contact form on most websites, they get a generic auto-reply — something like “Thanks for reaching out. We’ve received your message.” It’s functional but forgettable.
I wanted something better.
So I built a serverless contact form API that not only sends the submitted form data to my email using AWS services but also replies to the user with a unique, AI-generated inspirational quote. Instead of a bland confirmation, users receive something that leaves a positive impression.
What This Project Does
Accepts contact form submissions via a REST API
Sends the form details to my email using Amazon SES
Uses Amazon Bedrock to generate an inspirational quote
Sends the user a confirmation email that includes the quote
The website owner also gets an email with the message attached
All deployed and managed through Terraform
Technologies Used
AWS Lambda – Runs a Python script that processes form submissions.
API Gateway – Exposes a RESTful endpoint for the frontend form.
Amazon SES – Sends two emails: one to me and one to the user.
Amazon Bedrock – Generates a unique inspirational quote with every submission.
Terraform – Manages infrastructure as code.
Try It Yourself
Want to see it in action?
Head over to the contact page on my website and send me a message. You’ll receive an inspirational quote generated by Amazon Bedrock straight in your inbox!
Curious about how it's built?
👉 Check out the Terraform code on GitHub
