npm i -g serverless
to install serverless to your global npm- Run
yarn
to install all the required modules - Add your function(s) into the
functions
folder - Add those function(s) to
webpack.config.js
entry - Update the
serverless.yml
functions section to match with the changes - Run
yarn start
to run all the functions locally - Open the browser and navigate to the lambda function (eg. http://localhost:8000)
This is currently being setup through circleci to deploy automatically on merge to the dev and master branch If you however want to manually deploy it, then you'll need the following
- AWS credential setup
serverless deploy --stage test --region ap-southeast-1
to deploy. Alternatively,yarn bundle
to package the lambda functions intodist
folder
S3_BUCKET= S3 email template bucket
API_TOKEN= Qantas api token
API_BASE_URL= Qantas api url
REGION=ap-southeast-2
EMAIL_FUNCTION_NAME= lambda email microservice function name
ASSETS_LOCATION= S3 location for images