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
Hard@Work
Hard@Work4mo ago
You would want a CNAME record, not an A record
Flask
Flask4mo ago
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/
Hard@Work
Hard@Work4mo ago
A records only support IPv4 Addresses
brumbrum_brum
brumbrum_brumOP4mo ago
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?
Hard@Work
Hard@Work4mo ago
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
brumbrum_brum
brumbrum_brumOP4mo ago
What "old record" are you talking about? I am not super well versed in all this domain and dns stuff.
Hard@Work
Hard@Work4mo ago
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
brumbrum_brum
brumbrum_brumOP4mo ago
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.
Flask
Flask4mo ago
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")
brumbrum_brum
brumbrum_brumOP4mo ago
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?
Flask
Flask4mo ago
It should be safe to leave them there.
brumbrum_brum
brumbrum_brumOP4mo ago
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.
Flask
Flask4mo ago
Oh, so great to hear and glad to help! :MeowHeartCloudflare:
Want results from more Discord servers?
Add your server