e544f08505
DRAFT for mfa demo * for mfa demo * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/cognito-mfa-1 * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/cognito-mfa-1 * cleanup * list cognito users * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/cognito-mfa-1
29 lines
996 B
Bash
Executable File
29 lines
996 B
Bash
Executable File
AWS_REGION="us-east-2"
|
|
AWS_PROFILE="aarete"
|
|
|
|
LOG_FILE="user.creation.log.txt"
|
|
# pool stuff
|
|
# this is the unique name of the new pool to create. (and all of its dependencies)
|
|
USER_POOL_ID="us-east-2_21upuTkkT"
|
|
# user stuff - user email must be unique for this user pool
|
|
TEST_USER_EMAIL="foo2@gmail.com"
|
|
TEST_USER_PHONE="+18889091485"
|
|
TEMP_PASSWORD="TempPass123!"
|
|
|
|
|
|
echo "Creating test user '$TEST_USER_EMAIL'..." | tee -a "$LOG_FILE"
|
|
aws cognito-idp admin-create-user \
|
|
--region "$AWS_REGION" --profile "$AWS_PROFILE" \
|
|
--user-pool-id "$USER_POOL_ID" \
|
|
--username "$TEST_USER_EMAIL" \
|
|
--user-attributes Name=email,Value="$TEST_USER_EMAIL" Name=phone_number,Value="$TEST_USER_PHONE" \
|
|
--temporary-password "$TEMP_PASSWORD" \
|
|
--message-action "SUPPRESS"
|
|
|
|
aws cognito-idp admin-set-user-password \
|
|
--region "$AWS_REGION" --profile "$AWS_PROFILE" \
|
|
--user-pool-id "$USER_POOL_ID" \
|
|
--username "$TEST_USER_EMAIL" \
|
|
--password "$TEMP_PASSWORD" \
|
|
--permanent
|