Skip to main content

Lambda lift

Lambda Lift, is a streamlined building and deployment tool designed for developers and teams managing multiple Python-based AWS Lambda functions. Lambda Lift simplifies the packaging and deployment process, making it easier for you to focus on building and improving your applications.

Key Features

  • Designed to support multiple Lambda functions in a single repository
  • Utilize TOML files for easy and clear configuration of each deployed Lambda function
  • Supports deployment profiles (e.g., deployment to dev/staging/prod)

Limitations

  • Works with Python-based Lambdas only
  • Requires Python 3.10 or above
  • Requires a Lambda to exist at the time of deployment; this tool doesn't create Lambda functions

Getting started

Install the tool via PIP

pip install lambda-lift

Then use it from the command line

lambda-lift  # Build all lambdas
lambda-lift my-awesome-lambda my-another-lambda  # Build only lambda functions specified
lambda-lift my-awseome-lambda --deploy staging  # Deploy the lambda using the staging profile
lambda-lift --deploy-all prod  # Deploy all lambdas using the prod profile

Configuration

The configuration is done via TOML files. The files must be named either as lambda-lift.toml, or lambda-lift-<name>.toml (<name> could be anything). The configuration files can be placed anywhere in the repository - for example, all toml files in one location, or each toml file in the directory of the lambda it configures.

Toml example

[general]

# A name of your lambda to be used for selective building
# If not specified, the <name> part of the toml file name will be used
# If not specified and the toml file name doesn't have the <name> part, then the directory 
# name of the toml file will be used
name = "my-lambda"


[build]
# List all source paths that need to be included relative to the toml file
source_paths = ["src", "../common/src"]

# Path to the requirements file relative to the toml file. 
# If not specified, no requirements will be installed
requirements_path = "requirements.txt"

# Location of the resulting zip file relative to the toml file; must be specified
# git_root and name templates are available for all paths within the toml file
destination_path = "{git_root}/dist/{name}.zip"

# Location of the cache folder relative to the toml file; must be sprcified
# Cache folder speeds up updating lambdas by reusing the dependencies that haven't changed
cache_path = "deploy/prod/cache"

# The platform for which the lambda will be built. Must be either arm64 or x86, and must be specified.
platform = "arm64"

# The python executable to be used for fetching the dependencies. This parameter allows using 
# different python versions for different lambdas. If not specified, the same python executable
# that is used to run the lambda-lift will be used.
python_executable = "python3.12"

# The libraries which shouldn't be added to the resulting ZIP file
# Generally, these should be the libraries that are provided by AWS Lambda
# You can find a list of these libraries here: https://gist.github.com/gene1wood/4a052f39490fae00e0c3
# (check comments at the link)
ignore_libraries = [
    "awslambdaric",
    "boto3",
    "botocore",
    "jmespath",
    "pip",
    "python-dateutil",
    "s3transfer",
    "setuptools",
    "simplejson",
    "six",
    "urllib3",
    "numpy",
]

# Each deployment profile is a separate section in the toml file
# The name of the section is the name of the deployment profile
# The deployemnt profile is specified by the user when deploying the lambda
# For example: `lambda-lift my-lambda --deploy prod`

[deployment.prod]

# The AWS region where the lambda will be deployed. Must be specified.
region = "us-west-1"

# The name of the lambda in AWS. It must exist at the time of deployment.
# If it is not, first create it by using AWS console, AWS CLI, or a different tool
# such as Pulimi or Terraform.
name = "my-lambda-prod" 

# The name of the AWS profile to be used for deployment (optional)
aws_profile = "my-profile"

[deployment.staging]
region = "us-west-1"
name = "my-lambda-staging"
aws_profile = "my-profile"

Metadata

Release files for lambda-lift 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lambda-lift 0.0.12
File Size Uploaded
lambda_lift-0.0.12.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lambda-lift 0.0.12
File Interpreter ABI Platform
lambda_lift-0.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / lambda_lift-0.0.12.tar.gz

Download URL lambda_lift-0.0.12.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6785dae5e0ec286b6cecc1fdb554a8f01dd63817d20e52ea291cde3b608f4bf8
BLAKE2b-256 checksum
How to use checksums
6fe87dbab63de39b17805914fc0aa925b30dcc077a5ceeb261e60f137069fe47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / lambda_lift-0.0.12-py3-none-any.whl

Download URL lambda_lift-0.0.12-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aeaf1417f55669aa57a8d300aa99074ca4737e2f316078fff82573e31a240ebd
BLAKE2b-256 checksum
How to use checksums
28d293a0d7298b758c4977e82ddd365b3e11c817db6969f12e448d202f6d01ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.0.12 This release

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page