You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cognitoidentityserviceprovider.adminInitiateAuth call is taking around 10 Seconds to respond for first time. The successive calls are getting resolved faster like in 2 Seconds.
function_loginUserToUserPool(){returnnewPromise(function(resolve,reject){try{constparams={AuthFlow: 'ADMIN_USER_PASSWORD_AUTH',ClientId: '**************',UserPoolId: '**************',AuthParameters: {USERNAME: 'xyz@email.com',PASSWORD: 'password123'}};letstartTime=newDate().getTime();cognitoidentityserviceprovider.adminInitiateAuth(params,function(error,data){letdiff=(newDate().getTime()-startTime)/1000;console.log("time taken in seconds: "+diff);if(error){reject(error);}resolve(data)})}catch(err){reject(err);}})}_loginUserToUserPool();
Note:
This issue is not present in sdk version 2.361.0
issue noticed after upgrading the version to 2.618.0
tried v3 version of the SDKs as well. same issue is noticed
Expected Behavior
run the above code block and expected lesser latency
run 1: time taken in seconds: 1.717
run 2: time taken in seconds: 1.803
Current Behavior
first call takes longer time to resolve
run 1: time taken in seconds: 10.341
run 2: time taken in seconds: 1.717
run 3: time taken in seconds: 1.803
Reproduction Steps
please run the code block in description in Node Js env.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
2.1406.0
Environment details (OS name and version, etc.)
Windows 10, Node 16.16.0, npm 6.14.15
The text was updated successfully, but these errors were encountered:
Hi @gokul-ilango, sorry to hear about your issues. I think this behavior may be caused by the default credentials resolution, which will go over each credentials provider set in the default chain, and once the credentials are resolved the first time then, the subsequent calls will reuse those credentials and therefore you notice those calls take less than the first call. Could you please confirm which credentials provider are you using?, and would it be possible for you to explicit set it when instancing the client?. For example, lets assume your credentials are from environment then, you could the following:
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
Describe the bug
cognitoidentityserviceprovider.adminInitiateAuth call is taking around 10 Seconds to respond for first time. The successive calls are getting resolved faster like in 2 Seconds.
Note:
Expected Behavior
run the above code block and expected lesser latency
run 1: time taken in seconds: 1.717
run 2: time taken in seconds: 1.803
Current Behavior
first call takes longer time to resolve
run 1: time taken in seconds: 10.341
run 2: time taken in seconds: 1.717
run 3: time taken in seconds: 1.803
Reproduction Steps
please run the code block in description in Node Js env.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
2.1406.0
Environment details (OS name and version, etc.)
Windows 10, Node 16.16.0, npm 6.14.15
The text was updated successfully, but these errors were encountered: