Compatibility
This page separates package metadata, CI coverage, and AWS Lambda runtime
aliases. A pyproject.toml classifier describes what a package advertises; it
does not prove that a workflow executes that version. A runtime alias selects
an AWS CDK Runtime for a generated Lambda; it is not the Python version used
to run the package's tests or the version required to install the package.
Python packages
| Package | Minimum Python to install and run the package | Classifiers in pyproject.toml | Python versions executed by CI |
|---|---|---|---|
lambda-api-decorators | >=3.9 | 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 | 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 |
lambda-api-decorators-cdk | >=3.10 | 3.10, 3.11, 3.12, 3.13, 3.14 | 3.10, 3.11, 3.12, 3.13, 3.14 |
The first package is CDK-free and contains decorators and runtime helpers. The
second consumes those declarations and imports AWS CDK. The minimum versions
come from each package's requires-python; the classifier and CI columns are
reported separately because neither one changes the installation requirement.
These packages are used in different dependency scopes. Install
lambda-api-decorators-cdk in the CDK application that synthesizes the stack,
and install lambda-api-decorators in the Lambda source dependencies that CDK
packages for deployment. They do not need to be installed together in the same
environment: the first is infrastructure-side and the second is runtime-side.
The Getting Started dependency example
shows this split.
Lambda runtimes
The CDK builder registers these aliases and maps each one to the corresponding AWS CDK Python runtime:
Alias recognized by @runtime and the builder | What it means |
|---|---|
python3.10, python3.11, python3.12, python3.13, python3.14 | A lookup key for the matching aws_lambda.Runtime value when configuring a generated Lambda. |
These aliases are builder behavior, not the package compatibility promise. A
Lambda runtime is selected through LambdaApiConfig(default_runtime="alias")
or a @runtime("alias") declaration; the decorator overrides the default. See the
Lambda configuration guide and the
runtime API reference.
AWS CDK, Node.js, CLI, and Docker
| Concern | Verified current behavior |
|---|---|
| AWS CDK | The CDK package targets AWS CDK v2. Its package dependency is the unpinned aws-cdk.aws-lambda-python-alpha; the runnable examples declare aws-cdk-lib>=2.0.0,<3.0.0 and constructs>=10.0.0,<11.0.0. No narrower CDK version range is declared by the package itself. |
| AWS CDK CLI | The examples require the AWS CDK CLI for cdk synth, cdk bootstrap, cdk deploy, and cdk destroy. |
| Node.js | The documentation site declares Node.js >=20.0 in its own package.json. The Python packages and examples do not declare a Node.js version. AWS CDK CLI installation may add its own Node.js requirement. |
| Docker | The examples and their infrastructure tests require Docker because CDK's PythonFunction bundles Lambda source in a container. |
The CDK package uses AWS CDK as its current infrastructure backend. The
examples are the source of the stated aws-cdk-lib and constructs ranges;
they are not a promise that every future CDK v2 release has been tested.
REST and HTTP APIs
| Capability | REST API | HTTP API |
|---|---|---|
Construct created by LambdaApi when selected | aws_apigateway.RestApi | aws_apigatewayv2.HttpApi |
| Route decorators discovered from Python source | GET, POST, PUT, DELETE, ANY | GET, POST, PUT, DELETE in the current end-to-end path |
| Additional mappings in the low-level HTTP route table | N/A | CDK mappings exist for PATCH, OPTIONS, and HEAD, but the AST discovery layer does not recognize those decorator names, so they are not currently usable as discovered routes |
| Existing API support | Created or imported REST API objects with the supported REST interface | Concrete aws_apigatewayv2.HttpApi objects; imported HTTP interface objects are currently rejected by the concrete type check |
ANY is part of the public decorator API and is emitted by the REST builder.
It has no HTTP mapping and therefore cannot be used with an HTTP LambdaApi.
The complete route behavior is documented in REST and HTTP APIs, and API reuse is covered by Using an existing API.