Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiCustomDomain:
Type: AWS::ApiGateway::DomainName
Properties:
CertificateArn: ${self:custom.apiConfig.apiCert}
DomainName: api.sliclists.com
apiCustomDomainPathMappings:
Type: AWS::ApiGateway::BasePathMapping
Properties:
BasePath: ''
RestApiId:
Ref: ApiGatewayRestApi
DomainName:
Ref: apiCustomDomain
Stage: prod
apiDomainDns:
Type: AWS::Route53::RecordSetGroup
Properties:
HostedZoneId: ${self:custom.apiConfig.publicHostedZone}
RecordSets:
- Name: ${self:resources.Resources.apiCustomDomain.Properties.DomainName}
Type: A
AliasTarget:
DNSName: { Fn::GetAtt: [apiCustomDomain, DistributionDomainName] }
HostedZoneId: ${self:custom.cloudFrontHostedZoneId}
- Name: ${self:resources.Resources.apiCustomDomain.Properties.DomainName}
Type: AAAA
AliasTarget:
DNSName: { Fn::GetAtt: [apiCustomDomain, DistributionDomainName] }
HostedZoneId: ${self:custom.cloudFrontHostedZoneId}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment