Recently, I received a request to migrate our existing domain name from route 53 to another DNS provider which is Akamai. This domain name does have almost 200 DNS entries with different records and also many sub-domains in it.
Manual entry definitely is not one of the favorable options as human beings may make careless mistakes. One of the challenges will be there is no export option available in route 53. Did some online research but the information was quite limited although there are ways to export out in CLI it will be in JSON format.
In this article, I will be sharing how to export an export zone file in bind format from AWS Route 53. You will also learn what an export zone file in bind format is and why it is important.
The export zone file in bind format from AWS Route 53 is a configuration file that is used to configure the DNS records for a domain name. It is a text file that contains all the DNS records for the domain and can be exported from AWS Route 53.
How To Export Zone File in Bind Format from AWS Route 53?
There are a few tools required to download and I will be including the link as well. In addition, you will need a user account for the access key & secret access key as well in order to extract and export the zone file out. In total, there are 4 steps, let’s take a look:
Step 1: Install AWS CLI
Assume you already have or create a user account with the access key ID and Secret Access Key in the AWS account.
Next, You will need to install the AWS CLI into your laptop. You can get it directly at this link – https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Step 2: Configure AWS Credentials in your AWS CLI
To configure, you can simply run your command prompt and type aws configure and it will prompt you to enter the AWS Access Key ID & AWS Secret Access Key
You can watch this video here.
Step 3: Download CLI53
Next, you will need to get CLI53 released by barnybug and now you can download the executable file to run. It now supports various OS as well. You can get it at https://github.com/barnybug/cli53/releases
Step 4: Run CLI53 now to export out zone file from Route 53
In this example, I have donwloaded my window version of CLI51 which is cli53-windows-amd64.exe. Here are some of the commands
You can run the list command to list all the domain names hosted in your route53 using this – cli53-windows-amd64.exe list
To export the zone file, you simply use this export command here
cli53-windows-amd64.exe export yourdomain-name.com >export_filename.txt
What Other Features Do CLI53 Have?
There are things you can do by using this tool CLI53 beside import or export the zone file, you may want to refer to the readme document here for more details: https://github.com/barnybug/cli53/blob/master/README.md
- import and export BIND format
- create, delete and list hosted zones
- create, delete and update individual records
- create AWS extensions: failover, geolocation, latency, weighted and ALIAS records
- create, delete and use reusable delegation sets
Hopefully, this article will help to solve your problem while you trying to migrate from route53 to other DNS providers. Let me know what you think and feel free to share if you have other ways of export zone fine out from route 53