Discover Centmin Mod today
Register Now

AWS cloudfront to clouflare migration DNS

Discussion in 'Domains, DNS, Email & SSL Certificates' started by adamus007p, Dec 28, 2021.

Tags:
  1. adamus007p

    adamus007p Member

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:24 AM
    Hello Guys I want to migrate DNS from Route53 to clouflare, how you done it.

    Just change a DNS server?
    I see that cloudflare copy DNS entries but some are brocken or cloud flare cut it - TXT entries.


    Have you faced such problems?

    I am thinking about export all DNS from Route53 to file via API and maybe import it or copy and paste in Cloudfront.

    update: I mean Route53 AWS DNS not only foudfront.




    When I wanted to migrate from Route53 Cloudflare see only some entries and it did not copy all. I have 100 entries in DNS, Cloudflare copy abot 50.

    Have you have a similar problem? How you solved it?
     
    Last edited: Dec 28, 2021
  2. eva2000

    eva2000 Administrator Staff Member

    47,837
    10,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,947
    Local Time:
    6:24 PM
    Nginx 1.21.x
    MariaDB 10.x
    You need to export the AWS Route53 DNS zone file and import it into Cloudflare. I used cli53 tool to do AWS Route53 zone file export GitHub - barnybug/cli53: Command line tool for Amazon Route 53

    AWS Route53 DNS won't be able to export all DNS records as some would be proprietary and unique to Route53 DNS - provided you exported Route53 DNS records correctly that is.

    When I migrated from Route53 DNS to Cloudflare DNS, I also wasn't able to export all records, particularly for those DNS alias records pointing Route53 DNS to Cloudfront CDN and s3s and my AWS Route53 Geo Location load balanced DNS records. I had over 200+ DNS zone records.
     
  3. adamus007p

    adamus007p Member

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:24 AM
    Thank you :)

    @eva2000 After the export have you just delete SOA and NS and import it in Cloudflare or you have to fix, change something?
     
  4. adamus007p

    adamus007p Member

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:24 AM
    Tutorial I will add here Migrate AWS DNS records by using cli35 -

    I will add what is maybe it is not clear in Windows you need to create a folder:
    Code (Text):
    C:\Users\user\.aws

    and in the folder create a file name "credentials" with credentials like in tutorial.

    I was doing this a year ago and I have forgotten :)


    @eva2000 have you exporting using

    Code (Text):
    $ cli53 export example.com
    or
    $ cli53 export --full --debug example.com > example.com.txt 2> example.com.err.log
    


    Which option have you choose?

    I have used a full verions, just deltete NS, SOA and some old records. It works. :)
     
    Last edited: Dec 29, 2021
  5. eva2000

    eva2000 Administrator Staff Member

    47,837
    10,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,947
    Local Time:
    6:24 PM
    Nginx 1.21.x
    MariaDB 10.x
    I wrote a AWS Route53 DNS zone backup export script to backup dozens of AWS Route53 DNS zone sites. All used
    Code (Text):
    cli53 export --full domain > domain.zone
    
     
  6. adamus007p

    adamus007p Member

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:24 AM
  7. eva2000

    eva2000 Administrator Staff Member

    47,837
    10,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,947
    Local Time:
    6:24 PM
    Nginx 1.21.x
    MariaDB 10.x
  8. adamus007p

    adamus007p Member

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:24 AM
    Thank you @eva2000 for help.

    I know what you use SES, how may I use Amazon SES using Cloudflare?


    Now I had mail.domain.com for sending emails using SES.
    SES add automatically all keys to valid domains.

    I am wondering how to solve problem when the domain is "hosting" not in Route53 but in Cloudflare.


    An option would be to have other domian for sending emails only, but how to do with subdomain...


    I think that I have found a solution
    https://community.centminmod.com/threads/amazon-aws-route-53-dns-management-for-subdomains.1500/

    :)

    Am I right?
     
  9. eva2000

    eva2000 Administrator Staff Member

    47,837
    10,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,947
    Local Time:
    6:24 PM
    Nginx 1.21.x
    MariaDB 10.x
    Amazon SES only requirements are for correct DNS records setup for SPF and DKIM. They can be setup on any DNS host including Cloudflare via Cloudflare DNS.

    If you are already using Amazon SES, then exported Amazon Route53 DNS zone file should have those relevant Amazon SES SPF/DKIM DNS records you previously setup so importing the DNS zone file into Cloudflare DNS, will have them all setup already.

    If you don't have Amazon SES yet, then just setup it https://community.centminmod.com/threads/amazon-aws-ses-smtp-transactional-email-info.13842/ and add the DNS records required to Cloudflare DNS.