I'm trying to figure out how I can set the verification type from Code
(default) to Link
in my CloudFormation template.
In the website I can set it here:
If I take a look at the docs there is nothing mentioned. My CloudFormation looks like
SomeUserPoolResourceName:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: SomeResource_User_Pool
EmailVerificationType: Link # I want something like this
EmailVerificationSubject: 'Your verification link'
EmailVerificationMessage: 'Please click the link below to verify your email address. {##Verify Email##}' # fails because {####} is required
AliasAttributes:
- email
AutoVerifiedAttributes:
- email
Policies:
PasswordPolicy:
- ....
Schema:
- ....
Is it possible to configure this via CloudFormation?
Amazon Cognito can automatically verify email addresses or phone numbers. To do this verification, Amazon Cognito sends a verification code or a verification link. For email addresses, Amazon Cognito can send a code or a link in an email message. For phone numbers, Amazon Cognito sends a code in an SMS text message.
Call the SignUp API action, and provide the email address and phone number for the UserAttributes parameter. At this point, Amazon Cognito sends a verification code to the user's phone. In your app interface, present a confirmation page where the user enters the verification code.
A callback URL indicates where the user will be redirected after a successful sign-in. Enter Sign out URL(s). A sign-out URL indicates where your user will be redirected after signing out. Select Authorization code grant to return an authorization code that is then exchanged for user pool tokens.
With a user pool, your app users can sign in through the user pool or federate through a third-party identity provider (IdP). Identity pools are for authorization (access control). You can use identity pools to create unique identities for users and give them access to other AWS services.
No, it is not possible currently. As per the updated CreateUserPool API, a new VerificationMessageTemplate parameter will allow us to do this but cloudformation has yet to support this. AWS Support told that there is an existing feature request for the same. You can look into custom cloudformation resources as a workaround.
Try this:
SomeUserPoolResourceName:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: SomeResource_User_Pool
VerificationMessageTemplate:
DefaultEmailOption: CONFIRM_WITH_LINK
EmailVerificationSubject: 'Your verification link'
EmailVerificationMessage: 'Please click the link below to verify your email address. {##Verify Email##}' # fails because {####} is required
AliasAttributes:
- email
AutoVerifiedAttributes:
- email
Policies:
PasswordPolicy:
- ....
Schema:
Change this part:
EmailVerificationType: Link # I want something like this
For:
VerificationMessageTemplate:
DefaultEmailOption: CONFIRM_WITH_LINK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With