Skip to content

Instantly share code, notes, and snippets.

@maraca
Created January 3, 2014 23:35
Show Gist options
  • Select an option

  • Save maraca/8248866 to your computer and use it in GitHub Desktop.

Select an option

Save maraca/8248866 to your computer and use it in GitHub Desktop.
What the AWS documentation does not tell you when creating an AliasTarget is that the Type has to be set to "A" and not to "CNAME".
"AppDNSRecord" : {
"Type" : "AWS::Route53::RecordSet",
"Properties" : {
"HostedZoneName" : { "Fn::Join" : [ "", [ {"Ref" : "HostedZone" }, "." ] ] },
"Name" : { "Fn::Join" : [ "", [ { "Ref" : "MonitoringCNAMERecord" }, "." ] ] },
"Type" : "A",
"AliasTarget" : {
"HostedZoneId" : { "Fn::GetAtt" : [ "MonitoringELB", "CanonicalHostedZoneNameID" ] },
"DNSName" : { "Fn::GetAtt" : [ "MonitoringELB", "DNSName" ] }
},
"Comment" : "Monitoring CNAME alias to ELB"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment