AWS CDK provides an InterfaceVpcEndpoint and a VpcEndpoint. What is the difference between these two constructs?
Asked
Active
Viewed 1,930 times
1 Answers
5
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.

Marcin
- 215,873
- 14
- 235
- 294