Thauany Moedano
Thauany Moedano

Reputation: 611

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

Upvotes: 3

Views: 1287

Answers (1)

Thauany Moedano
Thauany Moedano

Reputation: 611

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

  EmailVerificationMessage: Your verification code is {####}.
  EmailVerificationSubject: Your verification code

Upvotes: 2

Related Questions