How to allow only email as username alias with CloudFormation?

早过忘川 提交于 2019-12-10 14:03:22

问题


Following this guide, it says:

On the Attributes tab, select Email address or phone number and select Allow email addresses.

Which looks like this:

But I'm having trouble accomplishing the same thing with CloudFormation. Tried a couple of the obvious attributes but did not work. Thoughts?


回答1:


It's now possible to do this by setting the UsernameAttributes property to an array of strings containing either email, phone_number or both:

Type: AWS::Cognito::UserPool
Properties:
  UsernameAttributes:
  - "email"
  UserPoolName: "test-pool"



回答2:


It seems that not possible using CFN. See this thread: https://forums.aws.amazon.com/thread.jspa?threadID=259349&tstart=0

Username attributes is a recently rolled out feature and it will be added in cloudformation templates soon.



来源:https://stackoverflow.com/questions/47777541/how-to-allow-only-email-as-username-alias-with-cloudformation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!