Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
AWSTemplateFormatVersion: 2010-09-09
Parameters:
HostedZoneId:
Type: AWS::Route53::HostedZone::Id
Description: The ID of the hosted zone to which the resource record should be added
Domain:
Type: String
Description: The Domain name for the API
Resources:
DomainName:
Type: AWS::ApiGateway::DomainName
Properties:
CertificateArn:
Ref: Certificate
DomainName:
Ref: Domain
EndpointConfiguration:
Types:
- EDGE
SecurityPolicy: TLS_1_2
Certificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName:
Ref: Domain
ValidationMethod: DNS
DomainValidationOptions:
- DomainName:
Ref: Domain
HostedZoneId:
Ref: HostedZoneId
RecordSet:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId:
Ref: HostedZoneId
Name:
Ref: Domain
Type: A
AliasTarget:
HostedZoneId:
Fn::GetAtt: DomainName.DistributionHostedZoneId
DNSName:
Fn::GetAtt: DomainName.DistributionDomainName
Outputs:
DomainName:
Description: The Domain name
Value:
Ref: Domain
Export:
Name:
Fn::Sub: ${AWS::StackName}-DomainName