Serverless TypeScript webpack

project to learn/explore serverless + typescript + webpack


example testing and deployment session

# cd to service dir
cd src/services/logger

# local test
../../../node_modules/.bin/sls webpack invoke -f scan --data '{"key1":"value1", "key2":"value2"}'

# deploy
../../../node_modules/.bin/sls deploy

# test logger endpoint - create log item
curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST

# lambda-limits service

# invoke concurrent lambda executions test
# ***warning** understand/check resource usage
curl -X POST

# kinesis-playground
# PUT record
curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST

# tail remote logs
../../../node_modules/.bin/sls logs -f hello -t


  • updated tsconfig.json with "target": "es2015"

  • needed to add the following for webpack + awesome-typescript-loader to run without errors

    yarn add @types/node --dev
    yarn add @types/async --dev