- AWS CLI Installed (for Debian based linux with apt:
sudo apt install awscli
) - Credentials for a user that has Route53 read access:
- Log into AWS Console
- Create API credentials
- Store credentials in
~/.aws/credentials
(put it in a[default]
block or create a new block to use if you have many accounts in there)
To cache the hosted zone json to your local machine (for other purposes or to run some tests prior to executing, run write_hosted_zones_to_json.sh
first to get the JSON from AWS first.
Once you have the file lcaolly, you can run get_all_hosted_zones_local.sh
to create the zone files.
To run the command in one go, calling the AWS CLI in real time, run get_all_hosted_zones.sh