Reputation: 2763
I have a domain hosted through Route 53 called foo.com and all is good. I have both NS and SOA records created in Route 53:
foo.com. NS
ns-1609.awsdns-09.co.uk.
ns-431.awsdns-53.com.
ns-1071.awsdns-05.org.
ns-662.awsdns-18.net.
foo.com. SOA
ns-1609.awsdns-09.co.uk. awsdns-hostmaster.amazon.com.
We also segment our platforms by account. So, we have an AWS subaccount that supports our DEV environment (following the AWS document: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-routing-traffic-for-subdomains.html). So, within our foo.com hosted zone, we also have an entry:
devapi.foo.com. NS
ns-3476.awsdns-09.co.uk.
ns-2341.awsdns-76.com.
ns-3245.awsdns-56.org.
ns-294.awsdns-67.net.
Within our AWS DEV account, we have a devapi.foo.com hosted zone with the exact same NS record:
devapi.foo.com. NS
ns-3476.awsdns-09.co.uk.
ns-2341.awsdns-76.com.
ns-3245.awsdns-56.org.
ns-294.awsdns-67.net.
along with a SOA record and an A record that points at the DEV API Gateway:
devapi.foo.com. A ALIAS f-8wdjr4hvgh.execute-api.us-east-2.amazonaws.com.
where f-8wdjr4hvgh.execute-api.us-east-2.amazonaws.com. is the domain name of the API Gateway.
I have a custom domain mapping for devapi.foo.com
Unfortunately, in all of this, devapi.foo.com is not pingable/routable. If you ping it, it returns an IP address but a Request timeout for icmp_seq* ...
If I use https://www.whatsmydns.net/#A/ for devapi.foo.com, I get green check marks but I believe that all that is telling me is that the domain name is resolvable.
Thoughts on what I am missing?
Followup: The issue was with the Custom Domain Mapping and Base Path.
Upvotes: 2
Views: 2973
Reputation: 3284
I ran into a problem where I went to setup a record that mapped my custom sub-domain to my API Gateway. When I went to select the actual endpoint I got a red warning/error message saying "cannot retrieve endpoint suggestions"
The instructions for setting everything up are here: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-api-gateway.html
Before doing what I was trying to do, the prerequisites (stated on the linked page) were:
I realized I had not done step #1. This needs to be done via the API Gateway interface, not the Route 53 interface. If you haven't done this for the domain yet (not the sub-domain, but the domain) you may need to do some work to setup a certificate for the domain. This involves placing what looks to be a sort of magic key entry in your domain registry (using Route 53 or whatever you used to register your domain) so that Amazon knows you own the domain.
Once this custom domain has been setup (again, in the API Gateway section, not Route 53), then I was able to create a record in Route 53 and my API Gateway endpoint was now detected for selection.
Upvotes: 1