Skip to content

Updating a Route53 resource set with meta-data of EC2 instance

Notifications You must be signed in to change notification settings

websdotcom/node-route53-updater

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status NPM version NPM dependencies

route53-updater

The route53-updater module can update an Record Set with the current IP or hostname of an machine. This can be useful if you have a single instance running in an auto scaling group. During startup of the EC2 instance you call the route53-updater to update the DNS entry to the new IP.

Port of https://github.com/taimos/route53-updater/

Update from 0.1.X to 0.2.X

Add "route53:GetChange" to the IAM access rights.

CLI Usage

Install route53-updater globally

npm install route53-updater -g

Create or update the DNS CNAME entry for test.yourdomain.com to point to the public hostname of the EC2 instance

route53-updater --action UPDATE --hostedZoneName yourdomain.com. --recordSetName test.yourdomain.com. 

The assumed defaults are

route53-updater --action UPDATE --hostedZoneName yourdomain.com. --recordSetName test.yourdomain.com. --ttl 60 --metadata public-hostname --type CNAME

The instance running the script needs the following IAM access rights:

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "Stmt1424083772000",
			"Effect": "Allow",
			"Action": [
				"route53:ChangeResourceRecordSets",
				"route53:ListHostedZones",
				"route53:ListResourceRecordSets",
				"route53:GetChange"
			],
			"Resource": [
				"*"
			]
		}
	]
}

Supported parameters:

About

Updating a Route53 resource set with meta-data of EC2 instance

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.5%
  • Makefile 4.5%