Trying to deploy a CFT that contains a Route53::RecordSet Resource. This is the error I get.
Tried to create an alias that targets \052., type A in zone Z1UJRXOUMOOFQ8, but the alias target name does not lie within the target zone
This is my CFT template for my Record Set Resource
DnsGateway:
Type: AWS::Route53::RecordSet
Properties:
Comment: DNS for custom domain endpoint
HostedZoneId:
Fn::ImportValue: !Sub "dns-${Environment}-HostedZoneId"
AliasTarget:
DNSName:
!Ref RegionalDomainName
HostedZoneId:
!FindInMap [ RegionMap, !Ref "AWS::Region", HostedZoneId ]
EvaluateTargetHealth: true
Name:
Fn::Join:
- "."
- - Example
- Fn::ImportValue: !Sub "dns-${Environment}-SubZoneDomain"
Type: A
Region: !Ref AWS::Region
SetIdentifier: !Sub "Example-API-RS-${Environment}-${AWS::Region}"