I use Raspberry PI to run my pet projects. Sometimes I need them available on the Internet, but I don’t want to pay for a dedicated IP address. I created a docker image allowing to dynamically create (or update) an A record in a Route 53 Hosted zone. Please see this article for details. The script updating records is copied from the article.
Create a file (named env.list
for example) with the following content:
AWS_ACCESS_KEY_ID=<your AWS_ACCESS_KEY_ID> AWS_SECRET_ACCESS_KEY=<your AWS_SECRET_ACCESS_KEY> ZONEID=<Route 53 Hosted zone ID> RECORDSET=<A name to create, notes.konoplev.me for example>
This AWS guide explains how to get AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
To find ZONEID, just open the corresponding zone on https://console.aws.amazon.com/route53/v2/hostedzones and click "Hosted zone details".
And, as soon as env.list
is ready, run:
docker run --env-file ./env.list --rm konoplev/aws-dynamic-dns
After it’s done, you should have the A record.