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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ