Description
Describe the bug
Delay in Receiving LimitExceededException for ResendConfirmationCode using the AWS SDK for .NET
The AWS SDK for .NET has the following bug related to Cognito
When calling ResendConfirmationCode using the SDK more than the allowed limit (5 calls per/ hour per/user), the call takes way too long to respond with a LimitExceededException.
This behavior seems to be isolated to the AWS SDK for .NET.
In comparison, the ResendConfirmationCode return LimitExceedException in less than 1 second when called via the cli.
The same issue is observed with the ConfirmForgotPassword
Expected Behavior
Receiving LimitExceededException should be taking around 1 second
Current Behavior
Receiving LimitExceededException is taking around 30 seconds
Reproduction Steps
- Configure Cognito user pool and SNS to send SMS for account confirmation
- Sign a user up in Cognito, set the phone_number attribute
- Observe that a code is sent to the user device
- Don’t confirm the user.
- Instead, call ResendConfirmationCode and observe the immediate response. Repeat this for 5 time until LimitExceededException is received.
- Observe the time taken to receive LimitExceededException is taking longer than 30 seconds
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.CognitoIdentityProvider 3.3.103.3 and current latest stable AWSSDK.CognitoIdenitityProvider 3.7.2.14
Targeted .NET Platform
.NET Framework 4.5
Operating System and version
Windows 10, Windows 11, WindowsServer 2016 Core