1. Install AWS CLI on a linux machine.
  2. Get the hosted zone ID for the hosted zone by logging onto AWS console and navigating to Route 53 panel.
  3. Ensure that AWS CLI user has permissions to read Route 53 records. You can attach AmazonRoute53ReadOnlyAccess policy to the user.
  4. Run the following command to get the output in json format.
$ aws route53 list-resource-record-sets --hosted-zone-id J2L9LK3GC3000 > ~/domainzone.txt