amazon-cognito

Cognito AdminUpdateDeviceStatus returns "device does not exist"


The Cognito method AdminUpdateDeviceStatus returns ResourceNotFoundException: Device does not exist even though the device does exist. I see it on the AWS console in the Device tracking log and it was successfully confirmed with ConfirmDevice steps before.

I am using the right region and client app too.


Solution

  • My code works in all the user pools I’ve created. But it doesn’t in the production pool, without any clear reason I can find through the AWS console or CLI.

    I have some suspects but no real evidence. If you run into a weird issue like this, try using the User ID (Sub) as the username instead of the email. It should work either way, and it does in every other pool, but well... This workaround made it for me.