-
Couldn't load subscription status.
- Fork 2.4k
Description
Support using HostedZoneName instead of HostedZoneId in the Domain section of an AWS::Serverless::Api, like this:
Globals:
Api:
Domain:
DomainName: www.domain.com
CertificateArn: arn:aws:acm:us-east-1:000000000000:certificate/abcxyz
EndpointConfiguration: REGIONAL
Route53:
HostedZoneName: www.domain.com
DistributionDomainName: www.domain.comThis property would just need to be passed directly to the HostedZoneName property of the AWS::Route53::RecordSet created resource, since CloudFormation itself handles looking up the hosted zone ID.
When you create a stack using an AWS::Route53::RecordSet that specifies HostedZoneName, AWS CloudFormation attempts to find a hosted zone whose name matches the HostedZoneName. If AWS CloudFormation cannot find a hosted zone with a matching domain name, or if there is more than one hosted zone with the specified domain name, AWS CloudFormation will not create the stack.