Skip to content

Deploy Python AWS Lambda functions using Serverless framework

Notifications You must be signed in to change notification settings

kepler62f/demo-serverless-lambda

Repository files navigation

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>.

About

Deploy Python AWS Lambda functions using Serverless framework

Topics

Resources

Stars

Watchers

Forks

Languages