--- id: aws-cdk-aws-lambda-python-alpha version: "2.265.0a0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.aws-lambda-python-alpha — The CDK Construct Library for AWS Lambda in Python License: permissive · Maintenance: active · Downloads: 1.6M/mo ## 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 above — 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 pip install aws-cdk-aws-lambda-python-alpha uv add aws-cdk-aws-lambda-python-alpha poetry add aws-cdk-aws-lambda-python-alpha ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags aws lambda python cdk, lambda function constructs, python lambda packaging, aws cdk lambda layer, serverless python deployment, lambda dependency bundling, cdk python runtime, aws-lambda, infrastructure-as-code, docker-packaging [View on SkillFed](https://skillfed.io/packages/aws-cdk-aws-lambda-python-alpha) · [View on PyPI](https://pypi.org/project/aws-cdk-aws-lambda-python-alpha/)