简体   繁体   中英

InterfaceVpcEndpoint vs VpcEndpoint in AWS CDK

AWS CDK provides an InterfaceVpcEndpoint and a VpcEndpoint . What is the difference between these two constructs?

Its about CDK constructs . You should know that there are 3 levels of constructs: L1 (low-level), L2 (regular) and L3 (high-level patterns).

InterfaceVpcEndpoint is L2 used to create interface VPC endpoints. VpcEndpoint class is a support class which is parent of InterfaceVpcEndpoint . You can think of VpcEndpoint as being somewhere between L2 and L1. You shouldn't use, or even cant use it directly, as its used to encapsulate common functionality between Interface VPC endpoints and Gateway VPC endpoints.

So to create interface endpoint, use InterfaceVpcEndpoint . Similarly to create gateway endpoint, use GatewayVpcEndpoint . Both are L2 constructs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM