GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rpivo/python-lambda-bundler: Bundle any Python function and its dependencies for Lambda with Docker and Amazon Linux

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
sh
sh
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
lambda_function.py
lambda_function.py
 
 
start.sh
start.sh
 
 

Repository files navigation

python-lambda-bundler

A simple template for bundling any Python function for Lambda and Amazon Linux.

Note: This template currently bundles Python 3.8, but this can be changed inside build.sh.

Why use Docker?

If you're using a non-Linux operating system as your development machine, you'll need to bundle Python dependencies for Linux somehow. This setup uses the amazonlinux Docker image to bundle Python dependencies for Lambda.

Setup

To build the Lambda zip:

  • Create an environment file inside the sh folder called env.sh that exports a LOCAL_PATH variable representing the current directory where the build will occur. Ex:
export LOCAL_PATH=~/Documents/projects/my-folder;
  • Add Python package dependencies to build.sh (see # install python dependencies section).
  • Start Docker.
  • Run sh start.sh.

If you plan on running this Docker setup on multiple projects, you should rename the container as specified inside the start.sh file (which is named as bundler currently) so that a different container that specifies a bind mount with the specific path is used for the project.

About

Bundle any Python function and its dependencies for Lambda with Docker and Amazon Linux

Topics

amazonlinuxawsbundlerdockerlambdalinuxpython

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.