Correct AdminDeleteUserCommand usage

0

It is unclear to me whether, when deleting a user from a user pool linked to an identity pool (which seems to be, e.g., an Amplify requirement), one should also delete the matching identity pool entry.

1개 답변
1

Hello,

Calling the "AdminDeleteUser" API operation[1], only deletes the user from the Cognito Userpool, but does not delete the Identity ID that was created for the user, when calling the "GetID"[2] API Operation. Furthermore, the same Identity ID would always be returned for the existing Userpool User, when calling the "GetID" API operation.

However, when deleting the user using the "AdminDeleteUser" API operation and the user sign-up again, using the same email address/username, the Identity Pool would then generate a new Identity ID for the user, when calling the "GetID" API operation. Considering that you can have an unlimited amount of Identity IDs within your Identity Pool, you can choose to delete the Identity ID that is linked with the deleted user, by using the "DeleteIdentities"[3] API operation and include the required Identity ID in the request.

[1] AdminDeleteUser - https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDeleteUser.html

[2] GetId - https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetId.html

[3] DeleteIdentities - https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_DeleteIdentities.html

I sincerely hope the above helps address the query of concern.

AWS
지원 엔지니어
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠