Registry /
aws / aws-cdk-aws-apigatewayv2-alpha
Install & Compatibility
Where this runs
tested against v2.114.1a0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 362.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 17.8s · import 0.000s · 363MB
400MB installed
● package 400MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
HttpApi
✓ from aws_cdk.aws_apigatewayv2 import HttpApi
✗ from aws_cdk.aws_apigatewayv2_alpha import HttpApi
The alpha module is deprecated; use stable import from aws_cdk.aws_apigatewayv2.
WebSocketApi
✓ from aws_cdk.aws_apigatewayv2 import WebSocketApi
✗ from aws_cdk.aws_apigatewayv2_alpha import WebSocketApi
Same as HttpApi; stable module provides identical constructs.
CfnApi
✓ from aws_cdk.aws_apigatewayv2 import CfnApi
✗ from aws_cdk.aws_apigatewayv2_alpha import CfnApi
Cfn resources are also in the stable module.
Use the stable aws-cdk-lib module instead of the deprecated alpha package.
from aws_cdk import App, Stack
from aws_cdk.aws_apigatewayv2 import HttpApi
app = App()
stack = Stack(app, "MyStack")
HttpApi(stack, "MyHttpApi")
app.synth()
cdk --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aws_cdk.aws_apigatewayv2_alpha'
The alpha package is no longer installed or is incompatible with the current CDK version.
fixInstall aws-cdk-lib (stable) and use imports from aws_cdk.aws_apigatewayv2.
ImportError: cannot import name 'HttpApi' from 'aws_cdk.aws_apigatewayv2_alpha'
The alpha package has been removed or the import path is incorrect.
fixUse 'from aws_cdk.aws_apigatewayv2 import HttpApi' from the stable aws-cdk-lib.
AttributeError: 'HttpApi' object has no attribute 'add_routes'
Method names may differ between alpha and stable modules.
fixRefer to the stable CDK API documentation; e.g., use 'add_routes' or configure routes via the HttpApi constructor.
Upgrade
Version history
2.114.1a0latest on PyPI · released Dec 6, 2023
Audit
Dependencies
aws-cdk-librequiredRequired for CDK core and stable modules. All API Gateway V2 constructs are now in aws-cdk-lib/aws-apigatewayv2.