Route 53 -> API GW -> CloudMap -> ELB Internal Server Error

0

I have a setup with where I have the following:

  • Custom domain name for HTTP API GW
  • HTTP API GW with ANY proxy route. This route has a VPC LINK integration with CloudMap
  • CloudMap Namespace with 1 Service. Under this service there are two registered ALBs with the correct internal DNS Alias from what I see
  • Each ALB forwards to unique ECS Service

Requests to my custom domain name return a "Internal Server Error". I tried the following setup which works fine to test that the API GW, VPC, VPC Link, and ALBs were configured appropriately

  • Custom domain name for HTTP API GW
  • HTTP API GW with ANY proxy route. This route has a VPC LINK integration with ALB
  • Each ALB forwards to unique ECS Service

Is this cloudmap setup a viable setup? I enabled cloudTrail logs on my setup and see API GW making DiscoverInstances requests, but responseElements in that log is null. When I try a discover instances requests from the AWS CLI, I do see the 2 ALBs show up as Service Instances. I see no requests hitting my load balancers in the cloud map setup (from cloudwatch metrics) so it does not look like the requests make it there

1 Answer
0

So this approach ended up working only if my LB was registered as a Cloudmap service by its direct IP Address, rather than the internal DNS name (ex. through CDK's registerLoadBalancer method). I believe it has to do with the way API Gateway's integration with Cloudmap works. Using direct IP Addresses for ELB does not seem to be recommended since the IPs can change

AWS
answered 2 months 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.

Guidelines for Answering Questions