I'm creating a Cognito User Pool and a test user using CloudFormation templates. I'm doing this for automated testing of login, user management code, and token code.
However, there doesn't appear to be a way to set the password to some known value so that the test code can proceed with login, which would be the first step in testing everything else.
related question but answer is "check your email account", which won't work for automated testing: Cloud Formation AWS::Cognito::UserPoolUser temporary password\
I can use the API to administratively set the password (at least the CLI can) but I want my test code to be as black box as possible. I want to specify all the preconditions in the Cloud Formation Template, as I do for everything else I'm testing.
This AWS forum answer says "use a custom resource", but provides no help in how to do so: