Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.31 KB

README.md

File metadata and controls

60 lines (44 loc) · 2.31 KB

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: