aws-samples / aws-lambda-ddns-function

Dynamically create Route 53 resource records using CloudWatch Events and Lambda
Apache License 2.0
236 stars 116 forks source link

A record instead of CName?? #8

Closed ghost closed 7 years ago

ghost commented 7 years ago

Is it possible to have the script create an A record instead of a CName record

For instance, instead of two records one would get created. For example: servername.domain.com A 100.100.100.100

This is because I am routing traffic between two VPC across regions. And AWS cannot resolve CNames across regions.

jicowan commented 7 years ago

The script will always create an A record. The domain name is inherited from the DHCP option set or you can use the zone tag. The script is not written to allow vanity host names. If you want a vanity host name, you need to create a CNAME record. That said, it wouldn't be that hard to modify the script to use the value of a tag as the host name.

ghost commented 7 years ago

I am looking at how I would do that. Any pointers?

ghost commented 7 years ago

I am afraid your code is too complicated for me to figure this out. Any chance that this feature is on your roadmap? I found someone else that has done a lambda script for updating an IP address for A records, but it does not create or delete them. It seems that no one else is working on this.