I had the same issue and I down graded aws sdk
to: @aws-sdk/client-cognito-identity-provider": "^3.687.0
from: "@aws-sdk/client-cognito-identity-provider": "3.726.1",