【问题标题】:How to set verification attributes on AWS cognito with cloudformation?如何使用 cloudformation 在 AWS cognito 上设置验证属性?
【发布时间】:2021-05-31 22:47:02
【问题描述】:

我正在尝试在具有 cloudformation 的 cognito 用户池上设置验证属性,并且我已经来回浏览文档很长一段时间了,但我找不到此设置的正确设置。

为了更清楚,这就是我想要改变的:

我当前的 yaml 文件如下所示:

UserPool:
Type: AWS::Cognito::UserPool
Properties:
  AdminCreateUserConfig:
    AllowAdminCreateUserOnly: false
  UserPoolName: !Sub ${AWS::StackName}-UserPool
  UsernameAttributes:
    - email
  AccountRecoverySetting:
    RecoveryMechanisms:
      - Name: verified_email
        Priority: 1
  VerificationMessageTemplate:
    DefaultEmailOption: CONFIRM_WITH_LINK
  Policies:
    PasswordPolicy:
      MinimumLength: 8
      RequireLowercase: true
      RequireNumbers: true
      RequireSymbols: true
      RequireUppercase: true
      TemporaryPasswordValidityDays: 7

有没有办法在 cloudformation 中做到这一点?

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation amazon-cognito


    【解决方案1】:

    只需将AutoVerifiedAttributes 属性值设置为[] - 一个空列表

    例子:

    Resources:
      CUP1FD5E:
        Type: AWS::Cognito::UserPool
        Properties:
          UserPoolName: SIMPLE
          UsernameAttributes:
            - email
          # empty list
          AutoVerifiedAttributes: []
    

    【讨论】:

      猜你喜欢
      • 2018-02-28
      • 2021-01-31
      • 2020-05-29
      • 2018-07-10
      • 1970-01-01
      • 1970-01-01
      • 2011-07-24
      • 1970-01-01
      • 2017-08-27
      相关资源
      最近更新 更多