Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 940 Bytes

readme.md

File metadata and controls

26 lines (19 loc) · 940 Bytes

Demo Serverless Lambda

To set up and deploy:

  • Clone this repo

  • Run npm install to install serverless plugins. The serverless configuration uses the docker option in serverless-python-requirements plugin to package the lambda. It uses serverless-pseudo-parameters to obtain the AWS account number from the deployment machine.

  • Ensure docker is installed and running:

https://docs.docker.com/install/linux/docker-ce/ubuntu/

  • Update the environment variables in serverless.yml for respective stages:

    • DOWNLOAD_URL: the url of the sql scripts zip file (custom.download_url..url)
    • DB_HOST: MySql database endpoint (custom.source_db..host)
    • DB_USER: MySql database username (custom.source_db..user)
    • DB_P: MySql database password (custom.source_db..p)
    • DB_NAME: MySql database name (custom.source_db..db)
  • Run sls deploy --stage <stage>.