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
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠