[PR #2124/97131eca backport][stable-7] ecs_taskdefinition: use aws_retry
to avoid throttling exception
#2128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #2124 as merged into main (97131ec).
SUMMARY
Fixes #2123 by adding
aws_retry=True
to the API calls.ISSUE TYPE
COMPONENT NAME
ecs_taskdefinition
ADDITIONAL INFORMATION
We observed that
ecs_taskdefinition
intermittently causes aThrottlingException
when running on a task definition with a large number of revisions. Looking at the code, it appears thatdescribe_task_definitions
loops over the revisions without using the retry mechanism. This PR attempts to solve the problem by addingaws_retry=True
to the API calls.Due to the nature of the problem (intermittent throttling by AWS), I couldn't devise automated tests that validate the fix.