Sign inSign up

felixb/aws-lambda-packager

By felixb

•Updated over 8 years ago

Packages your python lambdas.

Image
0

7.3K

felixb/aws-lambda-packager repository overview

⁠AWS lambda packager

Packages your python lambdas.

⁠Usage

Run the container like this to create a zip file for uploading to AWS lambda:

docker run \
    -u "${EUID}" \       # <-- this makes sure the resulting zip file is owned by you (and not by root)
    -v ${PWD}:/workdir \ # <-- this mounts your aws credentials inside the container's home dir
    felixb/aws-lambda-packager

You might want to add the following function to your .bashrc or similar to allow even easier usage:

function package_python_lambda() {
    docker run \
        --rm \
        -u "${EUID}" \
        -v ${PWD}:/workdir \
        felixb/aws-lambda-packager
}

⁠Configuration

Set LAMBDA_NAME environment variable to configure your output file name like this:

docker run -e LAMBDA_NAME=some-lambda ...

⁠Requirements

  • Your python code is located in your current working directory
  • There is a requirements.txt file in your current working directory

Tag summary

Content type

Image

Digest

Size

35.9 MB

Last updated

over 8 years ago

docker pull felixb/aws-lambda-packager