1 Answer
- Newest
- Most votes
- Most comments
1
Hello.
Try changing "HostedZoneId" to "Z2FDTNDATAQYW2" as described in the following document.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-route53.html#w4ab1c23c21c84c11
When you create alias resource record sets, you must specify Z2FDTNDATAQYW2 for the HostedZoneId property, as shown in the following example. Alias resource record sets for CloudFront can't be created in a private zone.
Your template would look something like this
FESCloudFrontDistributionDomainNameRecord:
Type: AWS::Route53::RecordSet # Defines a Route 53 record set
Properties:
# HostedZoneName: !Sub "${CustomDomainName}."
HostedZoneId: !Ref CustomDomainHostedZoneID
Name: !Sub "${CustomDomainName}." # Specifies the record name
Type: A # Specifies the record type as A
AliasTarget:
HostedZoneId: Z2FDTNDATAQYW2
DNSName: !GetAtt FECloudFrontDistribution.DomainName
Relevant content
- asked 8 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 4 months ago