Boiler Bill
Boiler Bill

Reputation: 1940

Update EmailSubject and EmailMessage in Cloud Formation config file

Anyone know if I can set the Email Subject and Email Message fields in my cloud formation template config file? enter image description here

It appears in the AWS documentation that those fields are not available.

Upvotes: 3

Views: 1181

Answers (2)

BartusZak
BartusZak

Reputation: 1253

There you go:

Resources:
  CognitoUserPool:
    Type: AWS::Cognito::UserPool
    Properties:
      UserPoolName: ${self:custom.service}-${self:custom.stage}-UserPool
      AdminCreateUserConfig:
        InviteMessageTemplate: 
          EmailMessage: "Your username is {username} and temporary password is {####}." 
          EmailSubject: "Your temporary password"

There is a whole documentation about configuring it using CloudFormation https://docs.amazonaws.cn/en_us/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-invitemessagetemplate.html#cfn-cognito-userpool-invitemessagetemplate-emailmessage

Upvotes: 7

Boiler Bill
Boiler Bill

Reputation: 1940

Ah, found it under AdminCreateUserConfig -> InviteMessageTemplate section

Upvotes: 1

Related Questions