a serverless contact form using AWS Lambda, API Gateway, and DynamoDB.
This project is about creating a serverless contact form using AWS Lambda, API Gateway, and DynamoDB. When a user submits the form, the data is stored in DynamoDB. This project serves as an introduction to serverless architecture and basic API creation.
lambda_function.py
: AWS Lambda function code handling the form submission.template.yaml
: AWS Serverless Application Model (SAM) template defining resources including Lambda, API Gateway, and DynamoDB.web/
: Simple HTML and JavaScript files for the contact form.
-
AWS Account: Ensure you have an AWS account. If not, create one here.
-
AWS CLI and SAM CLI: Install the AWS Command Line Interface (CLI) and AWS Serverless Application Model (SAM) CLI. Instructions can be found here.
-
Clone the Repository:
git clone https://github.com/yourusername/serverless-contact-form.git cd serverless-contact-form
-
Deploy the Application:
- Deploy the serverless application using SAM CLI.
sam deploy --guided
- Follow the prompts to configure the deployment, including AWS region, stack name, and other parameters.
- Deploy the serverless application using SAM CLI.
-
Access the Contact Form:
- Once the deployment is complete, the SAM CLI will provide the API Gateway endpoint URL.
- Open the provided URL in a web browser to access the serverless contact form.
-
Submit a Form:
- Fill out the contact form and submit it.
- The submitted data will be stored in DynamoDB.
Feel free to customize the project by modifying the Lambda function code, HTML, or JavaScript files in the web/
directory to match your specific requirements for the contact form.
- Create a serverless application using AWS Lambda, API Gateway, and DynamoDB.
- Understand the basics of AWS Serverless Application Model (SAM).
- Gain hands-on experience with serverless architecture.
- Learn how to create a simple API using API Gateway.