| Crates.io | ddns-route53 |
| lib.rs | ddns-route53 |
| version | 0.4.0 |
| created_at | 2025-03-31 04:13:42.096731+00 |
| updated_at | 2025-07-20 05:45:14.863952+00 |
| description | DDNS client for (AWS) Route53 |
| homepage | |
| repository | https://github.com/johnboy2/ddns-route53 |
| max_upload_size | |
| id | 1613005 |
| size | 169,950 |
ddns-route53 is a utility for creating a Dynamic DNS ("DDNS") solution for zones hosted by AWS Route53. Other hosting providers are not supported.
ddns-route53 works by first attempting to identify the public IPv4 or IPv6 address it is running at, using several possible algorithms set in its configuration. Once its address(es) are determined, it compares the result with the DNS resource records in a Route53-hosted zone and, if they differ, update the zone to match.
ddns-route53 source from GitHub, or check it out using git:
git clone https://github.com/ansible/ansible.git
cargo build --release
target/release/ddns-route53.Querying and updating a Route53 zone requires an IAM identity with appropriate permissions. See the AWS IAM documentation for details.
The following example shows one way to create an IAM user with limited permissions for exclusive use by ddns-route53.
Log into the IAM console as a user with sufficient administrative rights.
In the Dashboard, find "Access Management" and click on "Policies".
Click "Create policy"
Under the Policy editor, click on "JSON", and add the following content:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "route53:ChangeResourceRecordSets",
"Resource": "arn:aws:route53:::hostedzone/Z01234567890ABCDEFGHI",
"Condition": {
"ForAllValues:StringEquals": {
"route53:ChangeResourceRecordSetsNormalizedRecordNames": "home.example.com",
"route53:ChangeResourceRecordSetsRecordTypes": [
"A",
"AAAA"
]
}
}
},
{
"Effect": "Allow",
"Action": "route53:ListResourceRecordSets",
"Resource": "arn:aws:route53:::hostedzone/Z01234567890ABCDEFGHI"
},
{
"Effect": "Allow",
"Action": "route53:GetChange",
"Resource": "arn:aws:route53:::change/*"
}
]
}
Replace
home.example.comin the IAM policy above with the fully-qualified domain name of the record you want maintained.
The
"Resource"entries above must be updated to give the "ARN" of your zone, which is comprised of"arn:aws:route53:::hostedzone/"followed by your zone ID. If your Zone ID isZ12345(for example), then its ARN is"arn:aws:route53:::hostedzone/Z12345"— so that's what you should put under the first two"Resource"sections of the IAM policy above.
Click "Next"
Set a suitable policy name; e.g. DynamicDNS-home.example.com
Scroll down to the bottom and click "Create Policy"
In the Dashboard, find "Access Management" and click on "Users".
Click on "Create user"
Enter a suitable name into the "User name" field; for example ddns-user. Then click "Next"
Other options on this page can be skipped.
On the "Set Permissions" page under "Permissions options", select "Attach policies directly"
Under "Permissions policies", enter the policy name you chose above; that will filter the list of available policies to just those containing the name you gave; find your policy, and place a checkmark in the box next to its name
Click "Next"
Click "Create user"
DDNS update key.Always keep your AWS IAM credentials confidential!
A template configuration file is available at example/ddns-route53.conf. This file uses a TOML-based format. You should copy this file to another location and edit it to match your needs.
At a minimum, you should set the following:
host_name value, which should be a fully-qualified domain name within a Route53-hosted zone.aws_route53_zone_id of your zone.
This value is technically optional, because
ddns-route53can determine this dynamically; however that requires theListHostedZonespermission (which the example above omits). See the AWS IAM documentation for help in adding this permission if desired.
aws_access_key_id and aws_secret_access_key values for the IAM user you created, or else you'll need to make them available to the local user under which you will run ddns-route53 by following standard AWS SDK credential practices.Various other configuration options exist; see example/ddns-route53.conf for more information.
If the configuration file is in your current directory and is named ddns-route53.conf, then you can run the tool directly with no arguments:
ddns-route53
Alternatively, if your file has a different name or location, you can run it as:
ddns-route53 -c /path/to/config/file
This tool is a simple, "fire and forget" utility. That is, it checks your current IP address right now and updates Route53 if it differs. It does not recheck later.
If you want to run it periodically, you can use a third-party scheduler to do so. For example, the Windows Task Scheduler, Mac iCal, Mac launchd, and Unix/Linux cron jobs, and Linux systemd can all be configured to run ddns-route53 periodically.
MIT or Apache-2.0 at the user's choice.