Cognito

Definition

kind: database
cluster: <cluster-name>
name: <database-name>
class: identity
subClass: cognito
app-clients:
  - name: <client-name>
    native-config:
      RefreshTokenValidity:  10
      ReadAttributes:
        - name
        - email
      WriteAttributes:
        - name
      ExplicitAuthFlows:
        - ADMIN_NO_SRP_AUTH
triggers:
  PreSignUp:
      lambda: <lambda-name>
  PostConfirmation:
      lambda: <lambda-name>
  UserMigration:
      lambda: <lambda-name>
  PreTokenGeneration:
      lambda: <lambda-name>
native-config:
    Policies:
        PasswordPolicy:
    AutoVerifiedAttributes:
      - email
    SmsAuthenticationMessage: "Your authentication code is {####}. "
    SmsVerificationMessage: "Your verification code is {####}. "
    EmailVerificationMessage: "Your verification code is {####}. "
    EmailVerificationSubject: "Your verification code"
    VerificationMessageTemplate:
      SmsMessage: "Your verification code is {####}. "
      EmailMessage: "Your verification code is {####}. "
      EmailSubject: "Your verification code"
      EmailMessageByLink: "Please click the link below to verify your email address. {##Verify Email##} "
      EmailSubjectByLink: "Berlioz Account Verification"
      DefaultEmailOption: CONFIRM_WITH_LINK
    AdminCreateUserConfig:
      AllowAdminCreateUserOnly: false
      UnusedAccountValidityDays: 7
      InviteMessageTemplate:
        SMSMessage: "Your username is {username} and temporary password is {####}. "
        EmailMessage: "Your username is {username} and temporary password is {####}. "
        EmailSubject: "Your temporary password"
    CustomAttributes:
      - Name: 'custom:reg_id'
        AttributeDataType: String
        DeveloperOnlyAttribute: false
        Mutable: false
        Required: false
        StringAttributeConstraints: 
          MinLength: "1"
          MaxLength: "256"