gpt4 book ai didi

amazon-web-services - 如何在route53 HostedZone中创建记录

转载 作者:行者123 更新时间:2023-12-03 07:18:42 26 4
gpt4 key购买 nike

我已经创建了 CloudFront 分配并尝试将该记录附加到 Route53 托管区域。当我尝试时出现以下错误。

An error occurred: myDNSRecord - Invalid request: Expected exactly oneof [AliasTarget, all of [TTL, and ResourceRecords], orTrafficPolicyInstanceId], but found none in Change with[Action=CREATE, Name=abc.yz.com., Type=A,SetIdentifier=null] (Service: AmazonRoute53; Status Code: 400; ErrorCode: InvalidInput; Request ID: 81fd7f48-3ffb-4fa1-b1ba-cef599834a07;Proxy: null)

myDNSRecord:
Type: AWS::Route53::RecordSetGroup
DependsOn:
- cloudFrontDist
Properties:
HostedZoneId: !Ref 53HostedZoneId
RecordSets:
- Name: abc.yz.com
Type: A
TTL: 300
AliasTarget:
HostedZoneId: Z2FDTNDATAQYW2
DNSName:
Fn::GetAtt: [cloudFrontDist, DomainName]

我想在route53中托管CloudFront分配URL

最佳答案

别名记录不使用 TTL。因此,将其从模板中删除:

myDNSRecord:
Type: AWS::Route53::RecordSetGroup
DependsOn:
- cloudFrontDist
Properties:
HostedZoneId: !Ref 53HostedZoneId
RecordSets:
- Name: abc.yz.com
Type: A
AliasTarget:
HostedZoneId: Z2FDTNDATAQYW2
DNSName:
Fn::GetAtt: [cloudFrontDist, DomainName]

关于amazon-web-services - 如何在route53 HostedZone中创建记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67806400/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com