Provide a simple dynamic DNS creation and update service via Amazon Route53 and A (alias/subdomain) records.
Familiar with Docker? A docker image was created to deploy this service extremely quickly.
-
Clone this repository
git clone git://github.com/JacobSanford/route-53-dyndns.git cd route-53-dyndns
-
Install dependencies (virtualenv is recommended.)
pip install -r requirements.txt
-
Export environment variables
export AWS_ACCESS_KEY_ID="<Insert your AWS Access Key>" export AWS_SECRET_ACCESS_KEY="<Insert your AWS Secret Key>" export AWS_CONNECTION_REGION="us-east-1" (optional) export ROUTE53_ZONE="<Insert zone name>"
If ROUTE53_ZONE is not defined, base domain (TLD + 1) is used, e.g.
example.com
. -
Run the script
./r53dyndns.py -U http://www.whatismyip.com/ -R example.domain.com
Users would benefit from running this tool periodically. On linux systems, one option to do so is through the cron system.
-
Create a calling script
> vi /etc/cron.hourly/updateDynDNS #!/usr/bin/env bash export AWS_ACCESS_KEY_ID="" export AWS_SECRET_ACCESS_KEY="" export AWS_CONNECTION_REGION="us-east-1" /var/opt/route-53-dyndns/r53dyndns.py -U http://www.whatismyip.com/ -R example.domain.com
-
Create a calling script
chmod +x /etc/cron.hourly/updateDynDNS
-
(Test by running script directly)
> /etc/cron.hourly/updateDynDNS
- Amazon Route53 Dynamic DNS is licensed under the MIT License:
- Attribution is not required, but much appreciated:
Amazon Route53 Dynamic DNS by Jacob Sanford