如何使用 cloudformation 在 AWS cognito 上设置验证属性?
How to set verification attributes on AWS cognito with cloudformation?
我正在尝试使用 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中实现?
只需将 AutoVerifiedAttributes
属性值设置为 []
- 一个空列表
示例:
Resources:
CUP1FD5E:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: SIMPLE
UsernameAttributes:
- email
# empty list
AutoVerifiedAttributes: []
我正在尝试使用 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中实现?
只需将 AutoVerifiedAttributes
属性值设置为 []
- 一个空列表
示例:
Resources:
CUP1FD5E:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: SIMPLE
UsernameAttributes:
- email
# empty list
AutoVerifiedAttributes: []