LoginSignup
1
0

More than 1 year has passed since last update.

AdminRespondToAuthChallenge operation: Invalid attributes given, name is missing

Last updated at Posted at 2022-02-23

Amazon Cognito のユーザープールの設定で name などのカスタム属性を必須にしている場合、AWS CLIではそれも指定しなければならないのでその指定方法。

name がないと言われた

An error occurred (InvalidParameterException) when calling the AdminRespondToAuthChallenge operation: Invalid attributes given, name is missing

うん、確かにそう書いてあるよね。

NEW_PASSWORD_REQUIRED : NEW_PASSWORD , any other required attributes, USERNAME .

respond-to-auth-challenge — AWS CLI 2.4.20 Command Reference

でも、 NEW_PASSWORD="${new_password}",NAME=${name},USERNAME=${username} って指定しても同じ結果ですし。

というわけで正しい指定方法は userAttributes.name=${name} でしたよということでメモとして残しておこう。

$ aws cognito-idp admin-respond-to-auth-challenge \
  --user-pool-id ${user_pool_id} \
  --client-id ${app_client_id} \
  --challenge-name NEW_PASSWORD_REQUIRED \
  --challenge-responses NEW_PASSWORD="${new_password}",userAttributes.name=${name},USERNAME=${username} \
  --session "${session}"
1
0
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
0