1 Answer
- Newest
- Most votes
- Most comments
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.
Relevant content
- asked 2 years ago
- asked 5 years ago
- asked 8 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago