amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
939 stars 232 forks source link

Support for a private API Gateway attached to a VPC Endpoint #515

Open txynidakis opened 2 years ago

txynidakis commented 2 years ago

Community Note

Feature Request

Is your feature request related to a problem? Please describe. We have a Private API Gateway attached to a VPC where the API gateway URL is http://##########-vpce-???????????????????.execute-api.<aws region>.amazonaws.com

From what I understand, the route53 address is linked to the AWS CloudFront Distribution.

Describe the solution you'd like It would be nice to have an option to link the Route53 address to the VPC Endpoint URL

The configurations for the VPC Endpoint are in serverless.xml

provider:
  ...
  ...
  # AWS API Setting for a private interface
  endpointType: PRIVATE
  vpcEndpointIds:
    - ${self:custom.vpcendpoint.${self:provider.stage}}

Not sure if the npm plugin can read the existing serverless.xml configs and make the appropriate logical decisions or if additional configurations are required under customDomain:

custom:
  customDomain:
    vpcEndpoint: true

If this feature is developed, then from my knowledge, the A record needs to be linked to the API Gateway URL and not a CloudFront Distribution URL.

alock commented 1 year ago

One option could be following https://serverlessland.com/repos/apigw-private-custom-domain-name as an example. Unfortunately the NLB seems to require the static IP addresses of the private API-gateway.