Skip to content

using custom domain name with Private API Gateway

0

We were using custom domain name for the API endpoint via AWS hosted zone. This API is internal , so just public hosted zone was sufficient to create a custom domain name for the API endpoint. With the new change, we're converting the API to a private API - accessed via direct connect. API changes work fine and is verified to be accessed internally via direct connect, however, currently only defailt API gateway URl is used for accesing it. Previous setup for custom domain is not feasible with private API.

Could anyone please suggest how can we define a domain name for private API, one major criteria is, access to API endpoint should be only via direct connect not via internet, so any options to access an intermediate endpoint via internet and then pointing that to the private API won't work.

1 Answer
3

Hello.

It's mentioned in the documentation below, but I don't think you can use custom domains with private APIs.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html#apigateway-private-api-considerations

Custom domain names aren't supported for private APIs.

As a workaround, the AWS documentation introduces a method to create a load balancer targeting the private IP address of the ENI of the VPC endpoint linked to the private API Gateway.
https://repost.aws/knowledge-center/invoke-private-api-gateway
https://serverlessland.com/repos/apigw-private-custom-domain-name

EXPERT
answered a year ago
EXPERT
reviewed a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.