IAM AUTH Too many requests

0

We have a Django app running in lambda. It connects to the RDS Database through RDS PROXY Using IAM Auth. When we are doing load testing after certain load we start getting error saying Too many requests to the IAM AUTH service. When we tried creating a new AWS RDS PROXY without IAM AUTH configuration our load tests performed much better. But we wanted to check what is the best and scalable architecture. Should we remove the IAM AUTH and keep the communication direct BW the application and the IAM AUTH or there is a better way to do this. Also is there a document I can follow to understand the interaction between the RDS PROXY and IAM AUTH.

1 個回答
0

When using IAM authentication with RDS Proxy, you might encounter rate limits on the AWS Security Token Service (STS) when generating temporary credentials under high load. This can cause the "Too many requests" error that you're experiencing.

  • To reduce the number of requests to the IAM authentication service, you can implement caching of IAM credentials in your Django application. Store the generated credentials and use them until they're close to expiration. This way, you'll minimize the number of calls to the STS service, which can help you avoid rate limits
  • If caching IAM credentials does not provide the desired performance, you can consider using database credentials with RDS Proxy instead of IAM authentication. This approach might not be as secure as IAM authentication, but it can help you avoid rate limits and improve the overall performance of your application under load.
  • : Regardless of whether you use IAM authentication or database credentials, implementing connection pooling and reusing database connections in your Django application can help improve performance. This can help reduce the overhead of establishing new database connections and the associated IAM authentication requests.
  • If the "Too many requests" error persists, you can try contacting AWS Support to request an increase in the rate limits for your account.
profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南