This is sample application of serverless framework.
- Install aws-cli
$ brew install awscli
- Setup your credential
$ aws configure
- Install serverless framework
$ yarn global add serverless
# After install, check version
$ sls --version
- Install package
$ cd todo-management-serverless
$ yarn
- Install JDK
$ brew install adoptopenjdk8 --cask
- Copy env yml
$ cp .env.example.yml .env.local.yml
- Install dynamodb local
$ sls dynamodb install
- Start dynamodb
$ sls dynamodb start --stage local
- Start serverless in a new tab
$ yarn run offline
- Create S3 bucket on your aws console
- Copy and update env yml
$ cp .env.example.yml .env.dev.yml
$ vi .env.dev.yml
# Update table name and bucket name
- Deploy stage develop
yarn run deploy
- Follow above steps and create env yml (Replace “dev” with "prod”)
- Deploy stage production
$ sls deploy --stage prod
$ yarn run remove