I'm creating Cognito user using Cloud Formation template for Kibana cognito authentication. How to provide temporary password in the template?
Asked
Active
Viewed 2,411 times
1 Answers
1
Far as I know, you can't do this via AWS::Cognito::UserPoolUser which I believe you are using.
Set up a password policy in the UserPool creation and it should do the job.
Type: AWS::Cognito::UserPool
DeletionPolicy: Retain
Properties:
UserPoolName: UserPoolName
AdminCreateUserConfig:
AllowAdminCreateUserOnly: true
Policies:
PasswordPolicy:
MinimumLength: 16
RequireLowercase: true
RequireNumbers: true

Udara Jayawardana
- 1,073
- 2
- 14
- 27
-
1Hey, this is a password policy applicable for the all the users in the pool. What I need is create a user via Cloudformation, with user name and password which is complaint to this password policy – Murugesh Aug 13 '18 at 08:14
-
I don't think's an option for you to set up the temp password. If the policy is set, it should automatically create the password for the user. For user creation, you can follow the documentation. -> https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpooluser.html – Udara Jayawardana Aug 13 '18 at 08:29
-
thanks. Will it generate password automatically ? If so how do I can see the generated password? I think then password policy is optional to generate a default password – Murugesh Aug 13 '18 at 10:19
-
1It should be sent to you via the email provided. I've never done that myself, but it should follow the same steps in a manual user creation – Udara Jayawardana Aug 14 '18 at 03:48