- Create an AWS Lambda using a serverless framework.
- Create an API using API Gateway that takes the below JSON as input. The API will trigger lambda and pass the input to lambda.
- Lambda should read the data from the input and store it in MongoDB.
- You will need to create corresponding Schemas and Tables for MongoDB.
sudo apt install nodejs
sudo npm install -g serverless
- Create aws account
- Create IAM user - To create aws services using serverless framework
- Permissions
- AmazonS3FullAccess
- CloudWatchFullAccess
- AmazonAPIGatewayAdministrator
- AWSCloudFormationFullAccess
- AWSLambda_FullAccess
- Permissions
- Create IAM role - To execute lambda function
- Permissions
- CloudWatchLogsFullAccess: To create CloudWatch log stream from Lambda function
- Permissions
serverless create -t aws-nodejs
serverless config credentials --provider aws --key {key} --secret {secret} --overwrite
serverless deploy
serverless remove