This repository contains a simple CRUD (Create, Read, Update, Delete) application deployed using the Serverless framework on AWS. The application allows you to manage user records through a set of API endpoints.
These instructions will help you get a copy of the project up and running on your local machine for development and testing purposes.
Node.js and npm AWS Account Serverless CLI
Clone the repository:
git clone https://github.com/coderRaj07/aws-crud-serverless
cd aws-crud-serverless
npm install
DB=<your-database-connection-string>
To deploy the application to AWS Lambda and API Gateway using Serverless, follow these steps:
Make sure you have the AWS credentials properly configured either through environment variables or AWS CLI.
Deploy the application using Serverless:
serverless deploy
This will package and deploy your application to AWS Lambda and API Gateway.
Once the deployment is successful, you will receive a list of endpoints that you can use to interact with the application.
โ Service deployed to stack aws-crud-serverless-dev to stage dev (ap-south-1)
GET - https://6vh5xz3umd.execute-api.ap-south-1.amazonaws.com/ POST - https://6vh5xz3umd.execute-api.ap-south-1.amazonaws.com/users GET - https://6vh5xz3umd.execute-api.ap-south-1.amazonaws.com/users GET - https://6vh5xz3umd.execute-api.ap-south-1.amazonaws.com/users/{email}
api: aws-crud-serverless-dev-api (35 MB) createUser: aws-crud-serverless-dev-createUser (35 MB) getAll: aws-crud-serverless-dev-getAll (35 MB) getUser: aws-crud-serverless-dev-getUser (35 MB)
The following AWS Lambda functions are included in the deployment:
api - The main API handler. createUser - Handles user creation. getAll - Handles retrieving all users. getUser - Handles retrieving a specific user by email.
Node.js Serverless Framework AWS Lambda Amazon API Gateway MongoDB
Rajendra Bisoi