npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

route53-ddns

v1.0.3

Published

Update a Route53 DNS record when the public IP changes

Downloads

5

Readme

route53-ddns

A simple script to update a Route53 record when the public IP address changes. Similar to NoIP/DynDNS.

Node

Install

$ npm install route53-ddns

Usage

const { runRoute53Updater } = require('route53-ddns');

const main = async () => {
  await runRoute53Updater({
    interval: 60 * 60 * 6,
    domainName: 'test.example.com',
    recordType: 'A',
    hostedZoneID: 'Z123FFF1232132',
    updateSNSTopicARN: 'arn:aws:sns:eu-west-2:111111111111:ip_update'
  });
};

main().catch(err => console.error(err));

runRoute53Updater (options)

options

  • interval [number] Interval to check public IP
  • domainName [string] domain name to update in Route 53
  • recordType [string = 'A'] Record type
  • hostedZoneID [string] Hosted Zone ID
  • ttl [number] = 60 Record TTL
  • updateSNSTopicARN [string] = null SNS Topic to send updates on
  • updateSNSSubjectTemplate [string] = null SNS subject template
  • updateSNSBodyTemplate [string] = null SNS body template
  • logger [object] = pino A logger object with debug, info, warn and error. If not provided, pino is used
  • logLevel [string] = info Log level (pino)

Command Line

Install

$ npm install -g route53-ddns

Usage

$ export AWS_ACCESS_KEY_ID=xxx
$ export AWS_SECRET_ACCESS_KEY=xxx
$ export AWS_REGION=eu-west-2
$ export ROUTE53_DDNS_UPDATE_INTERVAL=21600
$ export ROUTE53_DDNS_DOMAIN_NAME=test.example.com
$ export ROUTE53_DDNS_RECORD_TYPE=A
$ export ROUTE53_DDNS_HOSTED_ZONE_ID=Z123FFF1232132
$ export ROUTE53_DDNS_UPDATE_SNS_TOPIC_ARN=arn:aws:sns:eu-west-2:111111111111:ip_update
$ route53-ddns

Accepted Environment Variables

Required
ROUTE53_DDNS_DOMAIN_NAME
ROUTE53_DDNS_RECORD_TYPE
ROUTE53_DDNS_HOSTED_ZONE_ID
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
Optional
ROUTE53_DDNS_UPDATE_INTERVAL = 21600            # 6 Hours
ROUTE53_DDNS_UPDATE_SNS_TOPIC_ARN = null        # Disabled
ROUTE53_DDNS_RECORD_TTL = 60
ROUTE53_DDNS_LOG_LEVEL = 'info'
ROUTE53_DDNS_UPDATE_SNS_SUBJECT = '[{domainName}] Public IP Updated'
ROUTE53_DDNS_UPDATE_SNS_BODY = 'domainName: {domainName}\ncurrentPublicIP: {currentPublicIP}\nhostedZoneID: {hostedZoneID}'