Skip to content

iwitaly/aws-lambda-docker-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

Sometimes when you upload Python binary packages to AWS Lambda from your local machine, you get an error. For example, if you want to use numpy with AWS Lambda you need a built version on AWS Linux.

Setting up AWS instance just for a build is a pain. That's why you can quickly install Docker and build any package on your machine. After building a package just copy into your vendored/ folder and upload to Lambda.

Usage

If you're ok with Python 3, simply build Docker image from a given Dockerfile with a command

docker build -t your_name/your_tag .

Don't forget to replace your_name and your_tag to whatever you want.

Then run your container and mount local folder with a desired requirements.txt file to a containers /workdir_container with a command

docker run --rm -v your_folder_with_requirements_file:/workdir_container your_name/your_tag

Now wait for packages to be built and find them at your_folder_with_requirements_file/vendored/.

About

Docker image for building packages for AWS Lambda with Python environment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published