Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VerificationMessageTemplate for Cognito in Cloud Formation does not work

I'm trying to create a cognito user pool using cloud formation. I'm using this yaml template

UserPoolApp:
    Type: AWS::Cognito::UserPool
    Properties:
      EmailConfiguration:
          EmailSendingAccount: COGNITO_DEFAULT
      MfaConfiguration: "OFF"
      Policies: 
        PasswordPolicy:
            MinimumLength: 8
            RequireLowercase: true
            RequireNumbers: true
            RequireSymbols: false
            RequireUppercase: false
            TemporaryPasswordValidityDays: 7
      Schema: 
        - Name: email
          Required: true
        - Name: name
          Required: true
      UsernameAttributes: 
        - email
      UserPoolName: !Ref AppUserPoolName
      VerificationMessageTemplate:
        DefaultEmailOption: CONFIRM_WITH_CODE
        EmailMessage: Your verification code is {####}.
        EmailSubject: Your verification code

But the user pool is created without the screen of verification email message

Cognito without customization of email message

Even if I remove VerificationMessageTemplate, the template still is created without this section. How can I solve this issue?

Thanks in advance

like image 938
Thauany Moedano Avatar asked Jan 31 '26 18:01

Thauany Moedano


1 Answers

In order to make the session appear I had to include in the template

  EmailVerificationMessage: Your verification code is {####}.
  EmailVerificationSubject: Your verification code
like image 192
Thauany Moedano Avatar answered Feb 03 '26 08:02

Thauany Moedano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!