Last active
April 13, 2019 04:19
-
-
Save jugyo/39fabf35a8412fc8fa39ecd5f74dfa0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Depends on App | |
AWSTemplateFormatVersion : '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: An example SAM template for Lambda Safe Deployments. | |
Parameters: | |
DomainName: | |
Type: String | |
CertificateArn: | |
Type: String | |
HostedZoneId: | |
Type: String | |
ApiName: | |
Type: String | |
Resources: | |
customDomain: | |
Type: AWS::ApiGateway::DomainName | |
Properties: | |
DomainName: !Ref DomainName | |
EndpointConfiguration: | |
Types: | |
- REGIONAL | |
RegionalCertificateArn: !Ref CertificateArn | |
dnsRecord: | |
Type: AWS::Route53::RecordSetGroup | |
Properties: | |
HostedZoneId: !Ref HostedZoneId | |
RecordSets: | |
- Type: A | |
Name: !Ref DomainName | |
AliasTarget: | |
HostedZoneId: !GetAtt customDomain.RegionalHostedZoneId | |
DNSName: !GetAtt customDomain.RegionalDomainName | |
domainMapping: | |
Type: AWS::ApiGateway::BasePathMapping | |
DependsOn: customDomain | |
Properties: | |
DomainName: !Ref DomainName | |
RestApiId: !ImportValue AppRestApiId | |
Stage: Prod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment