-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using InterfaceVPCEndpoint is awkward for custom PrivateLink connections #3627
Comments
@mitchlloyd you can chain the Fn.* together as such:
And also given that I'm using vpc endpoints to build alias records it might be ideal to also expose the HostedZoneId - this is needed because currently the ARecord builder doesn't support regions/continents so need to use CfnRecordSet as such:
|
@mitchlloyd the private DNS portion is fixed as of #5987 |
I am wondering if anyone else needs custom domain names for their interface VPC endpoints. Generally one could think of an architecture like this: Where the endpoint provider provides a VPC endpoint service (like private AWS API Gateway, RabbitMQ for AmazonMQ etc.) and the consumer would want to use a nice custom domain name like Typically that would be accomplished via another proxy (NLB) that balances between the ENIs (IPs) of the interface VPC endpoint. The NLB can have a custom domain name, together with a certificate. Unfortunately (afaik) the ENIs (ergo IPs) of the interface VPCe are only accessible via some API calls ( What do you think (aws or cdk-team or aws-customers)? Is the above desirable? |
@flemjame-at-amazon yes, if you are the provider, you can create a custom domain for VPC endpoint services that are consumed by your customers. In the case of RabbitMQ on AmazonMQ this would be something along the lines of However this is not the problem my suggestion would address. I am talking from the customer perspective, looking at the this domainname ( You could argue to just add a CNAME Record that points to
Does this make it clearer? |
@bweigel so you want to alias an endpoint to a user-defined name, and hide the certificate of the original service? Would there be any verification of the original service's cert? |
Only if there is no other way. What I (or rather the people I talk to inside our org) want is a custom domain name (i.e. a name that can be interpreted in our context) for the interface VPC endpoints.
I guess not, if the SSL termination moved to another place. |
I ran into this while trying to set up privatelink for ElasticSearch Cloud It seems that ElasticSearch did not set up a default dns, so Naively, I attempted:
This failed with:
Replacing the CnameRecord declaration with:
worked! |
A lot has changed since the original issue post: PrivateLink services can use private dns now, the default for As far as I can tell there is still not a better way to work with the |
|
I'm submitting a ...
What is the current behavior?
Using
InterfaceVPCEndpoint
seems oriented toward creating endpoints for AWS-managedservices. This makes it awkward to use for connecting to custom VPC Endpoint Services.
Specifically:
The
privateDNSEnabled: true
default doesn't work for custom VPC Endpoint servicesoutside of AWS Marketplace.
service com.amazonaws.vpce.us-west-2.vpce-svc-abc123 does not provide a private DNS name
.Getting the primary DNS name (i.e. the DNS entry that points to other AZs) is challenging.
Something like this does not work:
Instead, getting that value requires several Cfn functions:
service
property expects oneport
which is presumptuousbecause services can listen on many ports.
It may be the case that the intended use of InterfaceVPCEndpoint may be different enough
from connecting to custom VPC Endpoint Services to warrant a new class. I don't have any
good names but maybe
CustomVPCEndpoint
. This new construct would address the 3 issuesnoted above.
At the least, it would be nice if InterfaceVPCEndpoint had a
primaryDNSName
method so that users don't need to know the exact format of this Cfn value
to get a DNS name.
Make using custom PrivateLink connections with CDK more convenient.
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: