aws-serverless-contact-form/ β βββ lambda/ β βββ index.js # Lambda function code βββ screenshots/ # Documentation images β βββ ses.png β βββ iam.png β βββ lambda.png β βββ apigateway.png β βββ cors.png β βββ curltest.png β βββ architecture.png βββ README.md
This project demonstrates how to build a serverless contact form backend entirely on AWS, without managing any servers.
It integrates multiple AWS services to process form submissions securely and deliver emails directly to a verified address.
Workflow:
- User submits the form on the website.
- API Gateway receives the POST request.
- Lambda function validates and processes the input.
- Lambda uses AWS SES to send an email.
- CloudWatch logs every execution for monitoring.
- Verified sender/receiver email identity.
- DNS validation completed in Route 53.
- Configured to send emails within SES sandbox (only verified emails allowed).
- Written in Node.js to process incoming POST requests.
- Sends formatted email through SES.
- IAM execution role attached with:
AmazonSESFullAccessAWSLambdaBasicExecutionRole
- Created a REST API with
POST /contact. - Integrated directly with Lambda function.
- Enabled CORS to allow cross-origin requests from the frontend.
- Auto-deployment enabled on
$defaultstage.
- Created an execution role for Lambda.
- Permissions attached:
logs:CreateLogGrouplogs:CreateLogStreamlogs:PutLogEventsses:SendEmail,ses:SendRawEmail
- Monitors and logs Lambda executions.
- Used for debugging email delivery issues.
-
Configured SES
-
Created IAM Role
-
Developed Lambda Function
-
Setup API Gateway
-
Testing the Contact Form
- Hosted Zone was configured for the custom domain yusufyucel.com.
- DNS validation records were added for Amazon SES, allowing emails to be sent using the same domain.
- This setup not only enables static website hosting but also ensures that outgoing emails use a professional domain identity.

β Outcome
-A fully serverless contact form backend deployed on AWS. -Scalable, cost-efficient, and requires no server management. -Emails successfully delivered through Amazon SES.
π Resources
-Amazon SES Documentation = https://docs.aws.amazon.com/ses/ -AWS Lambda Documentation = https://docs.aws.amazon.com/lambda/ -Amazon API Gateway Documentation = https://docs.aws.amazon.com/apigateway/





