Skip to content

(aws_ec2.VpcEndpointService): Add a way to import existing VpcEndpointService #24606

@ronnypmuliawan

Description

@ronnypmuliawan

Describe the feature

Currently, there's no way to import an existing VpcEndpointService into CDK Project.
There's a lack of From* method for VpcEndpointService

Use Case

I have created NLB into my application's private subnet and exposed this NLB to a Private REST API Gateway via VPC Link.

It seems like adding VPC Link automatically creates a VPC Endpoint Service.
However, the problem is I cannot get a reference to the VpcEndpointService to use in CDK nor import VpcEndpointService.

I would like to modify the VpcEndpointService to expose the same NLB to an VpcEndpoint on another AWS Account.

I am intending to implement a Global API Gateway as written here: https://aws.amazon.com/blogs/compute/building-private-cross-account-apis-using-amazon-api-gateway-and-aws-privatelink/

Proposed Solution

  1. Expose VpcEndpointService when creating a VPC Link
  2. Allow a way to import existing VpcEndpointService into CDK.

Workaround:

  1. Create new NLB and new VpcEndpointService, but this is redundant and isn't cost-efficient.
  2. Manually or use AWS CLI to modify the existing VpcEndpointService (change the AllowPrincipal and AcceptanceRequired to false)

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.56.0

Environment details (OS name and version, etc.)

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ec2Related to Amazon Elastic Compute Cloudeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions