Phi*_*ipp 10 amazon-web-services aws-cloudformation amazon-cognito
我试图找出如何在(我的)CloudFormation模板中将验证类型设置为Code(默认)Link.
如果我看一下这些文档,就没有提到.我的CloudFormation看起来像
SomeUserPoolResourceName:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: SomeResource_User_Pool
EmailVerificationType: Link # I want something like this
EmailVerificationSubject: 'Your verification link'
EmailVerificationMessage: 'Please click the link below to verify your email address. {##Verify Email##}' # fails because {####} is required
AliasAttributes:
- email
AutoVerifiedAttributes:
- email
Policies:
PasswordPolicy:
- ....
Schema:
- ....
Run Code Online (Sandbox Code Playgroud)
是否可以通过CloudFormation进行配置?
不,目前不可能.根据更新的CreateUserPool API,新的VerificationMessageTemplate参数将允许我们执行此操作,但cloudformation尚未支持此功能.AWS Support表示存在针对该功能的现有功能请求.您可以查看自定义云信息资源作为解决方法.
小智 7
尝试这个:
SomeUserPoolResourceName:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: SomeResource_User_Pool
VerificationMessageTemplate:
DefaultEmailOption: CONFIRM_WITH_LINK
EmailVerificationSubject: 'Your verification link'
EmailVerificationMessage: 'Please click the link below to verify your email address. {##Verify Email##}' # fails because {####} is required
AliasAttributes:
- email
AutoVerifiedAttributes:
- email
Policies:
PasswordPolicy:
- ....
Schema:
Run Code Online (Sandbox Code Playgroud)
改变这部分:
EmailVerificationType: Link # I want something like this
Run Code Online (Sandbox Code Playgroud)
为了:
VerificationMessageTemplate:
DefaultEmailOption: CONFIRM_WITH_LINK
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1413 次 |
| 最近记录: |