Created
January 23, 2021 20:37
-
-
Save mdlavin/06de73a6cb75daaa58b79a855c7b5b49 to your computer and use it in GitHub Desktop.
Amplify custom auth domain template.yml
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
AWSTemplateFormatVersion: 2010-09-09 | |
Parameters: | |
env: | |
Type: String | |
authCognitoResourceUserPoolId: | |
Type: String | |
Mappings: | |
CustomAuthDomains: | |
master: | |
domain: auth.app.yourdomain.com | |
Conditions: | |
CreateCustomAuthDomain: !Equals | |
- master | |
- !Ref env | |
Resources: | |
CustomDomainCert: | |
Condition: CreateCustomAuthDomain | |
Type: AWS::CertificateManager::Certificate | |
Properties: | |
DomainName: !FindInMap | |
- CustomAuthDomains | |
- !Ref env | |
- domain | |
ValidationMethod: DNS | |
AuthDomain: | |
Type: AWS::Cognito::UserPoolDomain | |
Condition: CreateCustomAuthDomain | |
Properties: | |
Domain: !FindInMap | |
- CustomAuthDomains | |
- !Ref env | |
- domain | |
UserPoolId: !Ref authCognitoResourceUserPoolId | |
CustomDomainConfig: | |
CertificateArn: !Ref CustomDomainCert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment