Add a contact form to AWS S3 and CloudFront without building Lambda and SES
A static site on S3 and CloudFront can't handle a form post, and the usual fix is API Gateway, Lambda and SES. You can skip those by pointing the form at FormThunder, which stores each submission and emails you. Your bucket still only serves static files, and you can keep CloudFront's behaviours set to GET and HEAD.
Updated
The AWS code
<form action="https://formthunder.com/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<input type="hidden" name="subject" value="New message from the website">
<input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
<label for="name">Name</label>
<input id="name" name="name" required>
<label for="email">Email</label>
<input id="email" name="email" type="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" rows="5" required></textarea>
<button type="submit">Send</button>
</form>aws s3 sync ./dist s3://YOUR_BUCKET --delete
aws cloudfront create-invalidation \
--distribution-id YOUR_DISTRIBUTION_ID \
--paths "/contact.html"Replace YOUR_ACCESS_KEY with your free key. It's public by design, so it's safe in client code.
Notes for AWS
- The post goes from the browser to FormThunder and never passes through CloudFront, so you don't have to allow POST on your distribution.
- S3 website endpoints refuse POST. If you've seen a 405 from your own form before, that's why.
- A strict
Content-Security-Policyin a CloudFront response headers policy needs your FormThunder host inform-action, and inconnect-srcif you submit with fetch. - On Amplify Hosting, set the key under Environment variables with your framework's public prefix, then redeploy.
Or have your AI add it
Connect the MCP server, then ask. The agent creates the form and writes the code for you, and it can send a real test when it's done.
Add a FormThunder contact form to this AWS site that emails hello@example.com. Send a test when you're done.Questions
Why not build it with Lambda and SES?
You can, and it's a reasonable choice if you're happy to run it. You'd own the SES sandbox exit, retries, spam handling and logs, which are what this replaces.
Does FormThunder run on AWS too?
Yes. It runs on ECS Fargate across two availability zones with Multi-AZ Postgres, as set out on our reliability page.
Get your AWS form sending
The free plan covers 250 submissions a month, with MCP, the CLI and the brand kit included.