Serverless install

// 설치
$ curl -o- -L <https://slss.io/install> | bash

// 업그래이드 
$ serverless upgrade

// 로그인 
$ serverless login

Serverless Init

$ serverless

 What do you want to make? (Use arrow keys)
❯ AWS - Node.js - Starter
  AWS - Node.js - REST API
  AWS - Node.js - Scheduled Task
  AWS - Node.js - SQS Worker
  AWS - Node.js - Express API
  AWS - Node.js - Express API with DynamoDB
  AWS - Python - Starter
  AWS - Python - REST API
  AWS - Python - Scheduled Task
  AWS - Python - SQS Worker
  AWS - Python - Flask API
  AWS - Python - Flask API with DynamoDB
  Other

Serverless poliy

install

$ sudo npm install -g yo generator-serverless-policy

Set

$ yo serverless-policy 
? Your Serverless service name *
? You can specify a specific stage, if you like: *
? You can specify a specific region, if you like: ap-northeast-2
? Does your service rely on DynamoDB? Yes
? Is your service going to be using S3 buckets? Yes
app name *
app stage *
app region ap-northeast-2
Writing to *-_star_-ap-northeast-2-policy.json

Serverless profile

custom profile

$ serverless config credentials --provider aws --key 1234 \\
   --secret 5678 --profile custom-profile

https://github.com/choi-jiwoong/serverless-api-gateway