Package: route53-ddns
route53-ddnsThis package provide a simple CLI to update a Route53 Hosted Zone. This can be run as
cron job to provide a dynamic DNS functionality.The package usesipifyto get the current IP (or it can be provided as argument).Route53 interaction is achieved usingboto3.
Credentials can be provided in any of the supported way boto3 expects them.
Seeboto3 credentialsdocumentation.UsageTo update the recordhome.example.com, giving you have anexample.comhosted zone in your AWS account:$route53-ddns--zoneexample.com--recordhome2021-09-0222:09:18,289-root-INFO-Adjustingtargetrecordtobehome.example.com2021-09-0222:09:18,683-route53_ddns.ip_utilities-INFO-DetectedIP107.3.160.432021-09-0222:09:19,100-route53_ddns.route53_interface-INFO-Foundzone/hostedzone/XXXXXXXXXXXXXXwithnameexample.com.matchingtheexpectedexample.com2021-09-0222:09:19,100-route53_ddns.route53_interface-INFO-Checkingcurrentrecords2021-09-0222:09:19,437-route53_ddns.route53_interface-INFO-FoundrecordoftypeNSwithttl172800namedexample.com.2021-09-0222:09:19,437-route53_ddns.route53_interface-INFO-FoundrecordoftypeSOAwithttl900namedexample.com.2021-09-0222:09:19,437-route53_ddns.route53_interface-INFO-FoundrecordoftypeAwithttl60namedpif.example.com.2021-09-0222:09:19,438-route53_ddns.route53_interface-INFO-FoundrecordoftypeAwithttl60namedppi.example.com.2021-09-0222:09:19,438-route53_ddns.route53_interface-INFO-FoundrecordoftypeAwithttl60namedrpi.example.com.2021-09-0222:09:19,438-route53_ddns.route53_interface-INFO-Norecordsfoundmatchinghome.example.com.Anew'A'recordwouldbecreated.2021-09-0222:09:19,438-route53_ddns.route53_interface-INFO-Thecurrentvalueofhome.example.compointstoNone.Willupdateto10.0.0.12021-09-0222:09:19,438-route53_ddns.route53_interface-INFO-Submittingthechangeforhome.example.comtopointto10.0.0.12021-09-0222:09:20,112-route53_ddns.route53_interface-INFO-Statusofchange/change/C042853219OW934Y2B3A2isstillpending.Waiting5seconds2021-09-0222:09:25,556-route53_ddns.route53_interface-INFO-Statusofchange/change/C042853219OW934Y2B3A2isstillpending.Waiting5seconds2021-09-0222:09:30,942-route53_ddns.route53_interface-INFO-Statusofchange/change/C042853219OW934Y2B3A2isstillpending.Waiting5seconds2021-09-0222:09:36,155-route53_ddns.route53_interface-INFO-Statusofchange/change/C042853219OW934Y2B3A2isstillpending.Waiting5seconds2021-09-0222:09:41,318-route53_ddns.route53_interface-INFO-Statusofchange/change/C042853219OW934Y2B3A2isstillpending.Waiting5seconds2021-09-0222:09:46,619-route53_ddns.route53_interface-INFO-Statusofchange/change/C042853219OW934Y2B3A2isstillpending.Waiting5seconds2021-09-0222:09:51,856-route53_ddns.route53_interface-INFO-Change/change/C042853219OW934Y2B3A2hascompletedwithstatusINSYNC2021-09-0222:09:51,856-route53_ddns.route53_interface-INFO-Updatecompleted2021-09-0222:09:51,922-route53_ddns.ip_utilities-INFO-Recordhome.example.compointsto10.0.0.1To check the propagation status:$route53-ddns--zoneexample.com--recordhome-c2021-09-0222:14:43,791-root-INFO-Adjustingtargetrecordtobehome.example.com2021-09-0222:14:44,145-route53_ddns.ip_utilities-INFO-DetectedIP10.0.0.12021-09-0222:14:44,145-root-INFO-Runningincheck-onlymode.Validatingpropagationof10.0.0.12021-09-0222:14:44,146-route53_ddns.ip_utilities-INFO-Recordhom.example.compointsto10.0.0.1