【发布时间】:2018-11-05 16:00:16
【问题描述】:
我将记录集从云形成添加到 route53,这是代码
"RDSDNSRecord" : {
"Type" : "AWS::Route53::RecordSet",
"Properties" : {
"HostedZoneId" : { "Ref" : "DNSZoneId" },
"Comment" : "DNS name for RDS",
"Name" : { "Fn::Join" : [ "", [ { "Ref": "EnvType"}, "." ,"rds",".",{"Ref" : "AWS::Region"} ,".",{"Ref" : "HostedZone"},"." ] ] },
"Type" : "CNAME",
"TTL" : "900",
"ResourceRecords" : [
{
"Ref": "DatabaseEndPoint"
}
]
}
}
之前已经创建了 HostedZone。所以为了设置这些记录,我使用这些参数。
"DNSZoneId":{
"Type" :"AWS::Route53::HostedZone::Id",
"ConstraintDescription":"must be the name of an existing ZoneId"
},
"HostedZone":{
"Type": "String",
"Description":"Relavent Domain Name"
}
aws 要求将完全限定的域名传递给参数 Name。所以我向用户询问域名以及 ZoneId。我觉得问 ID 和 Name 都不对。有没有办法从 zoneId 或任何解决方法获取名称?
【问题讨论】:
标签: amazon-web-services amazon-cloudformation