Skip to main content

Serverless Framework

· One min read
Dipjyoti Metia
Chapter Lead - Testing

alt text

Where to start?

npm install -g serverless

alt text

  • Create IAM user

  • Setup user access
    serverless config credentials --provider aws --key xxxxxxxxxxxxxx --secret xxxxxxxxxxxxxx

  • Create project
    serverless create --template aws-nodejs --path my-service

  • Serverless yml

  • Serverless Deploy
    serverless deploy -v

alt text

Serverless offline

https://github.com/dherault/serverless-offline

serverless plugin install --name serverless-offline
serverless offline start

alt text

Insomnia

alt text

Serverless dashbird

Mongodb

alt text

$ npm init -y
$ npm i --save-dev serverless-offline
$ npm i --save mongoose dotenv
sls offline start --skipCacheInvalidation