Trying to create a simplest example of aws_route53_record A record creation
But when i do dig
its not resolving. I just created the record 5 mins ago. Is it because i cannot do it to my public IP or does it take time to take effect?
$ dig server1.devops.academy
; <<>> DiG 9.10.6 <<>> server1.devops.academy
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 10146
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;server1.devops.academy. IN A
;; AUTHORITY SECTION:
devops.academy. 331 IN SOA ns-1155.awsdns-16.org. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
;; Query time: 9 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sat May 16 14:18:29 +04 2020
;; MSG SIZE rcvd: 136
Why does a Route53 record I created with aws_route53_recordnot resolve publicly?
In order for a DNS record to resolve publicly, you need:
Make sure to register the domain and update the NS and SOA with the registrar to match the name servers from your Route53 Zone (if you are using Route 53 Domains, pick the Route 53 Zone). After that your issue should be corrected.
Here is how to register a domain in Route 53 Domains in the AWS Console (given that this costs around $12 I don't recommend automating it until you are very comfortable with the process).
It can take a few hours for a domain to successfully register.
More info on this process here: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html