aws-cdk.aws-lambda-python-alpha
The CDK Construct Library for AWS Lambda in Python
What it is and what it does
This is an AWS CDK library that provides high-level Python constructs for defining AWS Lambda functions and layers. It abstracts away the complexity of packaging Python code and dependencies into Lambda-compatible artifacts by automatically detecting and bundling requirements from `requirements.txt`, `Pipfile`, `poetry.lock`, or `uv.lock` files. The library uses Docker to ensure dependencies are compiled and packaged in an environment matching the target Lambda runtime, supporting multiple Python versions and custom bundling options for private package repositories or custom Docker images.
The package is built on top of aws-cdk-lib, constructs, jsii, and publication, and is actively maintained. It requires Python 3.10 or later and is classified as Beta. The description explicitly warns that its APIs are experimental and subject to breaking changes without semantic versioning guarantees, meaning upgrades may require code updates.
Use it for:
- Define and deploy Python Lambda functions with automatic dependency resolution using CDK infrastructure-as-code.
- Create reusable Lambda layers with shared Python dependencies that multiple functions can reference.
- Package Python code for Lambda using poetry, pipenv, or uv lockfiles to ensure reproducible builds.
- Deploy Lambda functions to private package repositories using custom bundling options.
- Exclude files from Lambda bundles to reduce package size.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides AWS CDK constructs for defining, packaging, and deploying Python Lambda functions and layers with automatic dependency management via Docker.
Yes, with conditions. Install if you are using AWS CDK to manage Lambda infrastructure and want Python function packaging automated. The low install friction and active maintenance are positive signals. However, be aware that this is a Beta library with experimental APIs—breaking changes can occur between versions without semantic versioning guarantees, so pin your version and review release notes before upgrading. Docker is a hard requirement for local development.
Install
aws-cdk-aws-lambda-python-alpha on PyPI
pip
pip install aws-cdk-aws-lambda-python-alphauv
uv add aws-cdk-aws-lambda-python-alphapoetry
poetry add aws-cdk-aws-lambda-python-alphaInstalling aws-cdk.aws-lambda-python-alpha
Before you install
Active maintenance with a release within 1 day of this fact sheet. Low install friction from a pure-dependency standpoint, but requires Docker to be installed locally for packaging Python Lambda functions and layers.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install aws-cdk-aws-lambda-python-alpha
from aws_cdk_aws_lambda_python_alpha import PythonFunction
PythonFunction(self, "MyFunction",
entry="/path/to/my/function",
runtime=Runtime.PYTHON_3_8
)
Docker must be installed and running locally; the construct uses Docker containers to package dependencies in a Lambda-compatible environment.
Verify before relying
- Stability guarantee: description states APIs are experimental and subject to non-backward compatible changes; impact on production use unclear.
- Performance characteristics of Docker-based packaging for large dependency trees not documented in excerpt.
- Whether all Python versions listed in classifiers (3.10 through 3.14) are equally supported or if some are preferred.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — aws-cdk-lib, constructs, jsii, publication |
| Maintenance | actively maintained — 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,617,559/month — #3,714 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_cdk_aws_lambda_python_alpha-2.265.0a0-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
aws-cdk.aws-lambdaDefines AWS Lambda functions and layers as…
permissive · top 15,000 on PyPI
aws-cdk.aws-samProvides AWS CDK v1 constructs for defining…
permissive · top 15,000 on PyPI
aws-cdk.asset-awscli-v1Bundles AWS CLI v1 as a reusable asset for AWS…
permissive · top 5,000 on PyPI
aws-cdk.aws-codestar-alphaProvides AWS CDK constructs for AWS CodeStar…
permissive · top 15,000 on PyPI
aws-cdk.lambda-layer-kubectl-v35Provides a Lambda Layer packaging kubectl…
permissive · top 15,000 on PyPI
aws-cdk.aws-s3-assetsPackages local files and directories for…
permissive · top 15,000 on PyPI
aws-cdk.asset-kubectl-v20Provides a Lambda Layer containing kubectl…
permissive · top 5,000 on PyPI
aws-cdk.aws-imagebuilderProvides AWS CDK L1 constructs for defining and…
permissive · top 15,000 on PyPI
datadog-cdk-constructs-v2Provides AWS CDK constructs to automatically…
permissive · top 15,000 on PyPI
aws-cdk.asset-node-proxy-agent-v6Bundles the NPM proxy-agent package (version…
permissive · top 5,000 on PyPI