0

I'm currently trying to automate the Cognito User Pool creation process via bash scripts on AWS-CLI. However, following the steps from the AWS console, I'm trying to reproduce the same steps via the CLI. I like to know which commands I should be looking at and in what sequence? The AWS docs don't really say much and the commands sometimes tend to be confusing.

Any ideas will be greatly appreciated.

Cheers! Nyah

2 Answers2

0

First install aws cli using following command

  • sudo pip install awscli

Configure AWS credentials, Run below commonond, system will ask following input AWS Access Key ID, AWS Secret Access Key, Default region name, Default output format

  • sudo aws configure

Create user pool

  • sudo aws cognito-idp create-user-pool --pool-name MyUserPool
Sandesh Kumar
  • 161
  • 3
  • 6
0

You can install first awscli

sudo pip install awscli

configure aws cli with your private key and access key.

to run configure aws-cli run the command:

aws configure 

For all the details of Cognito, you can find available command for it over here: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/index.html

Create the user pool in cognito:

aws Cognito-idp create-user-pool --pool-name <Whatever name you want to add>

Update the user pool incognito

aws cognito-idp update-user-pool --user-pool-id <value>

You can also refer this bash script :

https://github.com/awslabs/aws-cognito-angular-quickstart/blob/master/aws/createResources.sh

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102