To set up and deploy:
-
Clone this repo
-
Run
npm install
to install serverless plugins. The serverless configuration uses the docker option inserverless-python-requirements
plugin to package the lambda. It usesserverless-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>
.