https://github.com/iwitaly/aws-lambda-docker-builder
Docker image for building packages for AWS Lambda with Python environment
https://github.com/iwitaly/aws-lambda-docker-builder
aws aws-lambda docker docker-image numpy python python3
Last synced: about 1 month ago
JSON representation
Docker image for building packages for AWS Lambda with Python environment
- Host: GitHub
- URL: https://github.com/iwitaly/aws-lambda-docker-builder
- Owner: iwitaly
- License: mit
- Created: 2017-11-07T17:52:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-19T20:13:56.000Z (about 8 years ago)
- Last Synced: 2025-02-09T01:43:24.255Z (12 months ago)
- Topics: aws, aws-lambda, docker, docker-image, numpy, python, python3
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://docs.docker.com/installation/) 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/```.