AWS CDK: Should I be importing the *V2 modules?

0

I'm just starting out with the AWS CDK for Python. I see in the reference, there are several modules that have V2 appended to them:

  • aws_elasticloadbalancing vs aws_elasticloadbalancingV2

  • aws_apigateway vs aws_apigatewayV2

I could not find this anywhere in the docs.

jcaws
질문됨 6달 전152회 조회
1개 답변
0

Hello.

"aws_elasticloadbalancing" is used when creating a classic load balancer.
Therefore, you need to use "aws_elasticloadbalancingV2" when creating ALB or NLB.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancing-readme.html

The aws-cdk-lib/aws-elasticloadbalancing package provides constructs for configuring classic load balancers.

Use "aws_apigatewayV2" when creating Websocket and HTTP APIs, and "aws_apigateway" when creating REST APIs.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2-readme.html

This module supports features under API Gateway v2 that lets users set up Websocket and HTTP APIs. REST APIs can be created using the aws-cdk-lib/aws-apigateway module.

profile picture
전문가
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠