Cognito Too Many Requests Issue

0

We are using Cognito and have been intermittently encountering the "Too many requests" error for the past couple of months. This issue blocks the ability to log in to any of our environments for 15-20 minutes. According to the CloudTrail logs, the number of InitiateAuth events from a single client's IP address reaches more than 1000 within 5-6 seconds. Consequently, access is disabled due to rate limits. We initially suspected a DDoS attack, but this situation periodically occurs with different clients in different environments and cannot be the result of malicious actions, as we have verified that these are real clients. For integrating Cognito with our application, we are using the npm package "amazon-cognito-identity-js". Has anyone encountered a similar problem?

dz
asked 5 days ago97 views
1 Answer
1
profile picture
EXPERT
answered 5 days ago
profile picture
EXPERT
reviewed 4 days ago
  • You are right that the quota is being exceeded, which is why the block occurs. It is unclear why Cognito is registering a large number of requests, leading to the quota being exceeded in the described situation. Has anyone encountered a similar issue?

  • Use AWS CloudTrail to log all API requests made to Cognito. Examine the logs to understand which requests are being made, their frequency, and their sources. Look for patterns in the "InitiateAuth" events to determine if they are originating from specific clients or IP addresses. Monitor CloudWatch metrics for your Cognito user pool https://docs.aws.amazon.com/cognito/latest/developerguide/metrics-for-cognito-user-pools.html