{"id":23301,"library":"aws-cdk-aws-apigatewayv2-alpha","title":"AWS CDK Amazon API Gateway V2 (Alpha)","description":"Deprecated AWS CDK module for Amazon API Gateway V2 (HTTP and WebSocket APIs). All constructs are now available under aws-cdk-lib/aws-apigatewayv2 as of CDK v2. This alpha module is frozen at version 2.114.1a0 and receives no updates. Users must migrate to the stable module.","status":"deprecated","version":"2.114.1a0","language":"python","source_language":"en","source_url":"https://github.com/aws/aws-cdk","tags":["aws-cdk","apigatewayv2","deprecated","alpha"],"install":[{"cmd":"pip install aws-cdk-aws-apigatewayv2-alpha==2.114.1a0","lang":"bash","label":"legacy"}],"dependencies":[{"reason":"Required for CDK core and stable modules. All API Gateway V2 constructs are now in aws-cdk-lib/aws-apigatewayv2.","package":"aws-cdk-lib","optional":false}],"imports":[{"note":"The alpha module is deprecated; use stable import from aws_cdk.aws_apigatewayv2.","wrong":"from aws_cdk.aws_apigatewayv2_alpha import HttpApi","symbol":"HttpApi","correct":"from aws_cdk.aws_apigatewayv2 import HttpApi"},{"note":"Same as HttpApi; stable module provides identical constructs.","wrong":"from aws_cdk.aws_apigatewayv2_alpha import WebSocketApi","symbol":"WebSocketApi","correct":"from aws_cdk.aws_apigatewayv2 import WebSocketApi"},{"note":"Cfn resources are also in the stable module.","wrong":"from aws_cdk.aws_apigatewayv2_alpha import CfnApi","symbol":"CfnApi","correct":"from aws_cdk.aws_apigatewayv2 import CfnApi"}],"quickstart":{"code":"from aws_cdk import App, Stack\nfrom aws_cdk.aws_apigatewayv2 import HttpApi\n\napp = App()\nstack = Stack(app, \"MyStack\")\nHttpApi(stack, \"MyHttpApi\")\napp.synth()","lang":"python","description":"Use the stable aws-cdk-lib module instead of the deprecated alpha package."},"warnings":[{"fix":"Replace all imports from aws_cdk.aws_apigatewayv2_alpha with aws_cdk.aws_apigatewayv2 from aws-cdk-lib.","message":"Complete module deprecation: aws-cdk-aws-apigatewayv2-alpha is no longer maintained. All constructs have moved to aws-cdk-lib/aws-apigatewayv2.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Review the stable CDK docs for aws-apigatewayv2 to adapt any custom constructs.","message":"Removal of alpha-specific classes: e.g., HttpMethod, VpcLink (if any) may have different names or parameters in the stable module.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Migrate to aws-cdk-lib/aws-apigatewayv2 immediately.","message":"The alpha package will not receive security updates or bug fixes.","severity":"deprecated","affected_versions":"all"},{"fix":"Use only aws-cdk-lib/aws-apigatewayv2 for all API Gateway V2 resources.","message":"Do not mix imports from both alpha and stable modules in the same stack; it can cause construct ID conflicts or version mismatches.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install aws-cdk-lib (stable) and use imports from aws_cdk.aws_apigatewayv2.","cause":"The alpha package is no longer installed or is incompatible with the current CDK version.","error":"ModuleNotFoundError: No module named 'aws_cdk.aws_apigatewayv2_alpha'"},{"fix":"Use 'from aws_cdk.aws_apigatewayv2 import HttpApi' from the stable aws-cdk-lib.","cause":"The alpha package has been removed or the import path is incorrect.","error":"ImportError: cannot import name 'HttpApi' from 'aws_cdk.aws_apigatewayv2_alpha'"},{"fix":"Refer to the stable CDK API documentation; e.g., use 'add_routes' or configure routes via the HttpApi constructor.","cause":"Method names may differ between alpha and stable modules.","error":"AttributeError: 'HttpApi' object has no attribute 'add_routes'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}