Confirm user from User Pool

Hi, I’ve been trying to deal with confirming a registered user in the Cognito User Pool through command prompt. This is what I entered into the cmd prompt:
aws cognito-idp admin-confirm-sign-up --region us-east-2 --user-pool-id us-east-2********* --username (myusername)

the error message says: An error occurred (InvalidSignatureException) when calling the AdminConfirmSignUp operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

I look forward for some help

Weird. This usually means that something in your local machine is not configured properly. Are you belt toe make other AWS CLI calls?

The signing process also relies on your local machine’s clock. Just make sure that is set correctly as well.

Do you have multiple profiles? I had issues around this before because I am maintaining multiple profiles and mixed up the user-pool-id with a different account. I suggest trying what the error is asking and verify that you don’t have the wrong secret access key. I would try regenerating the aws_access_key_id and aws_secret_access_key for your serverless admin user just to be sure that all your credentials are setup correctly. I have started this repo to make things more consistent because I am switching around between aws accounts:

Its also nice when you regenerate your infrastructure because you don’t need to copy the new values from the aws console. Let us know what happens after you verify your config.

1 Like

Nevermind, it was the problem with the region, i did not specify it in one of the files that needs it lol. Sorry to bother…

1 Like