LoginSignup
1
2

More than 3 years have passed since last update.

CognitoのAWS-cliコマンド集

Last updated at Posted at 2019-11-06

ユーザの作成

aws cognito-idp admin-create-user \
--user-pool-id ap-northeast-1_XXXXXXXXX \
--username username \
--user-attributes Name=atr_name,Value=atr_value \
--profile profile_name

ユーザプールのユーザーパスワード設定

--permanent を付けると、ステータスが CONFIRMED になる。

aws cognito-idp admin-set-user-password \
--user-pool-id ap-northeast-1_XXXXXXXXX \
--username username \
--password password \
--permanent \
--profile profile_name

ユーザの属性値変更

aws cognito-idp admin-update-user-attributes \
--user-pool-id  ap-northeast-1_XXXXXXXXX \
--username username \
--user-attributes Name=atr_name,Value=atr_value \
--profile profile_name

Cognitoのサインアウト

access_token=XXXX
aws cognito-idp global-sign-out --access-token ${access_token}
echo $? # コマンドの実行結果が返ってこないのでじっこうステータスを見る
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2