Cognito authen TooManyRequestsException error? how to fix it to test performance?

Viewed 198

I have serverless model with cognito, api, lambda, dynamo.

I want to test performance with 10000 users asccess in the sametime. But Cognito seems to only allow authen 120 requests/s

I'm using jmeter to test. I'm having trouble logging in with a large number of users. Please help!Thanks

1 Answers

https://docs.aws.amazon.com/cognito/latest/developerguide/limits.html#limits-hard

There is a hard limit on the number of authentication requests supported to a Cognito hosted UI of 150 per second.

The 'hard' limit means AWS will not increase this limit for you.

However, the limitation is not on Cognito, but rather the hosted UI. So if you want to support more concurrent logins you might need to host your own authentication UI.

There might be another workaround that I have not tested (I'm not sure if it will work). I think you can have a hosted UI per app client. What you could try is creating more App Clients, they can basically be identical. Then you would need to split your traffic across the UIs. Clearly this wouldn't help your operational concurrency (unless you put a load balancer at the front) but it might help you in testing.

Related