- Create a Public Hosted Zone in Route 53
- Create a simple record for the domain you want, and where do you want to target that domain to?
- By now, you should have
3records under the hosted zone that you just created- NS
- SOA
- A
- Copy all the 4 nameservers associated with this "Hosted Zone". You should be able to find those under Hosted zone details
- Now we want to direct the traffic coming to Cloudflare (for a particular subdomain) to AWS's Route 53
- Add all the 4 nameservers to the DNS settings in Cloudflare
Type: NSName: api in case the subdomain is api.example.comContent: Each of the nameservers that you just copied from the Route 53 Hosted zoneTTL: AutoProxy Status: DNS only
That's about it. Just wait for a few mins and you should be able to access with your own subdomain.