- cli53
- AWS credentials in
~/.aws/credentials
- GNU make
- Git (optional)
- Perl (optional, for the commit message hook)
Create a Makefile
that includes the route53.mak
file:
include /path/to/route53.mak
If you want to use a non-default AWS credential profile, set the PROFILE
variable in Makefile
, like this:
include /path/to/route53.mak
PROFILE = myprofilename
Create a .gitignore
file to ignore the .route53
directory:
/.route53
Run make ZONENAME
For example: make example.com
This will create a hosted zone in your AWS account for example.com
if one doesn't already exist, and then export the zone file to a file named example.com
in the current directory. The zone file will contain the NS records for the zone.
After editing your zone files, run: make -j
This will upload your changes to Route 53 and wait for them to be published.
Copy or symlink prepare-commit-msg
to the .git/hooks
directory and your commit
messages will be automatically prepended with the name(s) of the changed
zone(s), like this:
[example.com] Update MX record
[example.com, example.net] Update CAA records