AWS Route 53 Alias DNS
I am trying to connect my AWS api gateway to a CF domain using route 53.
I have created an alias record inside my route 53 zone pointing to the gateway.
The record is of type "A", and has a value of: "d-ID.execute-api.ZONE.amazonaws.com.".
When I try and create a DNS record for this in the CF dashboard, I get an error stating that I cannot do it, because the value is not a valid IPV4 adress. What do I do?
13 Replies
You would want a CNAME record, not an A record
AWS alias record is an AWS stuff which you can route traffic to an AWS resource with the applicable value. However, normal A record only supports IPv4 value. You may want to check out the doc here: https://www.cloudflare.com/learning/dns/dns-records/dns-a-record/
A records only support IPv4 Addresses
And then just use the same value? I have tried it, but it does not seem to work. Since I just did it about 30 minutes ago, the changes might not have propogated yet?
Assuming that the old record wasn't created, yeah. It can take up to 24 hours for an initial DNS record to be visible globally
What "old record" are you talking about? I am not super well versed in all this domain and dns stuff.
Since you weren't able to create the A record, then it might take a while
If it had succeeded, then it would have been just a few seconds to switch
Ah okay, thank you
Just to clarify, so I am not waiting for an invalid DNS propagation.
I can only create an DNS record in AWS of type A, if I want to connect it to my gateway. Should I still just use the value for a CF CNAME record, from the aws A type value?
And also, when using DNS lookup tools, should I be able to see the CNAME record? Currently there are no records.
If your CNAME record on cf is DNS only, yes, you should be able to see this; if it's proxied, no.
I think an A record on AWS route 53 is not fully necessary, you would have an "invoke URL" after creating an API gateway. The necessary steps after creating your api could be:
1. create a certificate on AWS ACM for your domain on CF, then validate it following the instruction on ACM
2. add a CNAME record on CF pointing to your api (or cloudfront if it's in front of your api, or other things on AWS which can route to your api)
3. create base path mapping on AWS for your domain (otherwise you would have "forbidden")
Yea I think you are right, just found and article and video doing the same for Cloudflare specifically.
I have changed the settings, so I will just wait and see.
Thank you!
But in Route 53 I already have some auto-generated records for nameservers in my hosted zone. Should I remove those from route 53, or should I just leave them?
It should be safe to leave them there.
Thank you so much! It seems like most areas around the world are starting to propogate my changes, and I can reach it from my PC.
Oh, so great to hear and glad to help! :MeowHeartCloudflare: