https://github.com/jaleelb/aws-serverless-contact-form
A Next.js-based serverless contact form implementation utilizing Amazon SES for email sending. This repository demonstrates how to build a responsive contact form with form validation and processing, leveraging AWS SDK to send emails through Amazon Simple Email Service.
https://github.com/jaleelb/aws-serverless-contact-form
amazon-ses aws aws-sdk contact-form email-sending javascript nextjs react serverless web-development
Last synced: 3 months ago
JSON representation
A Next.js-based serverless contact form implementation utilizing Amazon SES for email sending. This repository demonstrates how to build a responsive contact form with form validation and processing, leveraging AWS SDK to send emails through Amazon Simple Email Service.
- Host: GitHub
- URL: https://github.com/jaleelb/aws-serverless-contact-form
- Owner: JaleelB
- Created: 2023-03-28T03:53:05.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T01:55:17.000Z (about 2 years ago)
- Last Synced: 2025-01-10T14:58:00.477Z (4 months ago)
- Topics: amazon-ses, aws, aws-sdk, contact-form, email-sending, javascript, nextjs, react, serverless, web-development
- Language: TypeScript
- Homepage:
- Size: 3.15 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Serverless Contact Form
A simple contact form implementation using Next.js, Amazon Simple Email Service (SES), and AWS SDK. This project demonstrates how to build a serverless contact form for your website that sends emails to the recipient.## Features
- Serverless contact form using Next.js API routes
- Integration with Amazon SES for email sending
- Basic form validation and error handling
- Email content stored in a text file## Prerequisites
- Node.js v12.x or later
- npm v6.x or later
- An AWS account with access to Amazon SES## Getting Started
1. Clone the repository:
`https://github.com/JaleelB/aws-serverless-contact-form.git`2. Navigate to the project directory:
`cd aws-serverless-contact-form`3. Install the dependencies:
`yarn install`4. Set up AWS credentials:
- Create an IAM user with the necessary permissions for Amazon SES.
- Configure your AWS credentials by setting the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or by using the [AWS CLI](https://aws.amazon.com/cli/).5. Verify the sender and recipient email addresses in Amazon SES.
6. Set the environment variables for the sender email address and AWS region in the .env.local file:
`
[email protected]
AWS_REGION=your_aws_region
`7. Start the development server:
`yarn dev`8. Open your browser and navigate to http://localhost:3000 to see the contact form in action.
## Deploying to Production
Before deploying to production, make sure you have requested production access for your Amazon SES account to send emails to any recipient.
To deploy the application to a production environment, you can use any hosting service that supports Next.js, such as [Vercel](https://vercel.com/) or [Netlify](https://www.netlify.com/).