By using AWS re:Post, you agree to the Terms of Use
/HTTP API Custom Domain not working/

HTTP API Custom Domain not working



We have an HTTP API Gateway setup with a VPC Link mapping to an ALB which serves the request from an ECS Fargate Task.

I have set up a Regional Custom Domain Name for my api like The result is a Target Domain Name in the form of:

I added the Route53 Alias from my to the above "API Gateway domain name". A ALIAS

I added the API mapping of the custom domain on stage "$default" with no path configured. Neither nor my custom domain navigates to my API (400 Bad request). But https://[ApiId] does. There is a query param in the URL which the ECS task doesn't find according to the logs when trying to use the custom domain or the

  • Are you able to reach the target but a request parameter is missing? Or are you not even able to reach the API?

  • We are able to reach the target both of the time. But we're getting a 400 status code when we try to access it via or We get the correct response when trying to access the endpoint via https://[ApiId]

    The URL in both cases are the same, the only difference being the domain. The logs suggest that the request is missing query string param when called through or domain

2 Answers


Tim here from the AWS Support Team.

Sorry to hear you're having issues with your HTTP API. Based on the description I'm not quite sure at the moment what the exact cause may be (Thanks Uri for helping out!).

I'd like to ask if you can open up an AWS Support case with us? We'd love to take a peek at the account specific items, and we can have multiple teams assist us on that medium (Route53, API Gateway, others if needed).

answered 3 months ago
  • My understanding is that query string parameters are not forwarded to the VPC Link integration when using either of the custom domain name options ( or

  • Thank you for the suggestion, Tim. I did end up opening a support case and was able to get this issue resolved! Our API Gateway route had a proxy pass with any method configured which was the culprit. We had to explicitly configure each and every method after which we were able to get this working.

Accepted Answer

For anyone using HTTP API and the proxy route ANY /{proxy+}

You will need to explicitly define your route methods in order for custom domain routing and CORS to work. Wish this was more explicit in the documentation but hopefully this can help people facing this issue some time!

answered 3 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