Skip to content

Add AssumeRole error cache#200

Closed
schleyfox wants to merge 1 commit into
jtblin:mainfrom
schleyfox:add-negative-cache
Closed

Add AssumeRole error cache#200
schleyfox wants to merge 1 commit into
jtblin:mainfrom
schleyfox:add-negative-cache

Conversation

@schleyfox

Copy link
Copy Markdown
Contributor

When AssumeRole is successful, the success is cached for (by default) 15
minutes. On failure, there is no cache. In cases of misconfiguration,
this can result in a large number of AssumeRole calls against the AWS
API, which, in extreme cases, can result in API rate limiting, causing
other applications in the AWS account to experience failures.

This adds a negative cache on AssumeRole to prevent error cases from
spamming the API. This is set to 0 by default to preserve existing behavior,
but a value of 30 seconds to 1 minute would be reasonable.

When AssumeRole is successful, the success is cached for (by default) 15
minutes.  On failure, there is no cache.  In cases of misconfiguration,
this can result in a large number of AssumeRole calls against the AWS
API, which, in extreme cases, can result in API rate limiting, causing
other applications in the AWS account to experience failures.

This adds a negative cache on AssumeRole to prevent error cases from
spamming the API.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 19.474% when pulling 46bce9d on schleyfox:add-negative-cache into 80efbb1 on jtblin:master.

@schleyfox

Copy link
Copy Markdown
Contributor Author

@jrnt30 can you look at this?

@jtblin

jtblin commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Rebased and PR #397.

@jtblin jtblin closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants