Skip to content

joshuabergeron/lambda

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build AWS Lambda deployment packages with Docker

Blog post (includes tips on reducing package size)

An easier way to build AWS Lambda deployment packages — with Docker instead of EC2

Why?

Example: Python 3.6 deployment package

docker pull quiltdata/lambda

docker run --rm -v $(pwd)/create_table:/io -t \
	-e GIT_REPO quiltdata/lambda \
	bash /io/package.sh
  • Mount /io as a docker volume
    • /io should contain package.sh and your lambda code \
    • /io is where the deployment package, lambda.zip, is written \
  • Pass environment variables with -e
  • --rm so that, for example, secure envs aren't written to disk

Customize

Modify package.sh to suit your own purposes.

Build container

docker build -t quiltdata/lambda .

Clone private GitHub repo in container

Use a personal access token:

git clone https://${TOKEN}@github.com/USER/REPO

About

Build Lambda deployment packages faster with Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 62.0%
  • Dockerfile 38.0%