Skip to content

Manonandan/weather-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weather-task

Task:

  • 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.

Prerequisite

  1. NodeJS

sudo apt install nodejs

  1. Serverless

sudo npm install -g serverless

  1. AWS
  2. MongoDB

AWS setup

  1. Create aws account
  2. Create IAM user - To create aws services using serverless framework
    • Permissions
      • AmazonS3FullAccess
      • CloudWatchFullAccess
      • AmazonAPIGatewayAdministrator
      • AWSCloudFormationFullAccess
      • AWSLambda_FullAccess
  3. Create IAM role - To execute lambda function
    • Permissions
      • CloudWatchLogsFullAccess: To create CloudWatch log stream from Lambda function

Serverless commands

serverless create -t aws-nodejs
serverless config credentials --provider aws --key {key} --secret {secret} --overwrite
serverless deploy
serverless remove

About

Bewgle Hiring Task

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published