alessioalex / dynroute

Node CLI tool for dynamic DNS using Route53
46 stars 5 forks source link

Use private IP instead of public IP? #11

Open z-br opened 9 years ago

z-br commented 9 years ago

Any thoughts on how to get this to work with the private (in-VPC, or in EC2) IP rather than the web public IP?

alessioalex commented 9 years ago

I think you should use the official aws sdk for this, I haven't updated this module in a long time.

The docs for the official sdk are here: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Route53.html

The method for changing records is this one: changeResourceRecordSets

The code for changing the record in dynroute can be found here (as an inspiration): https://github.com/alessioalex/dynroute/blob/master/dynroute.js#L138-L194

I haven't played with VPC myself, so I'm not sure what to tell you, but I found these 2 articles that may be of help:

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-creating.html

http://grokible.com/aws-vpc-topics-effective-use-of-route-53-private-hosted-zones/

Let me know how this works out!