stephencsmall / serverless-ddns-route53

DDNS service for Route53 via Serverless and AWS Lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serverless Route53 DDNS Service

This is a serverless service that provides DDNS functionality for AWS Route53.

Serverless v1 does not yet support environment variables, so this service is not yet secure. Anyone with the right non-secret URL could use it to update your Dynamic DNS entries.

To use it, you need a Route53 hosted zone and an IAM role with access to update it. This policy works:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1468016031000",
      "Effect": "Allow",
      "Action": [
        "route53:ChangeResourceRecordSets"
      ],
      "Resource": [
        "arn:aws:route53:::hostedzone/ABCZONEID"
      ]
    }
  ]
}

Then all you need is a system on dynamic IP network to periodically call the function to update it. A cron job works fine for me:

30 * * * * /opt/bin/curl -q https://97r5k1bsn4.execute-api.us-east-1.amazonaws.com/dev/update?name=my.name.com&hosted_zone_id=ABCZONEID 2>&1 > /dev/null

About

DDNS service for Route53 via Serverless and AWS Lambda

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 100.0%