community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

[PR #2124/97131eca backport][stable-7] ecs_taskdefinition: use `aws_retry` to avoid throttling exception

Open patchback[bot] opened this issue 1 year ago • 3 comments

This is a backport of PR #2124 as merged into main (97131eca035974f41ad17357ef9bef8a0a61f675).

SUMMARY

Fixes https://github.com/ansible-collections/community.aws/issues/2123 by adding aws_retry=True to the API calls.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ecs_taskdefinition

ADDITIONAL INFORMATION

We observed that ecs_taskdefinition intermittently causes a ThrottlingException when running on a task definition with a large number of revisions. Looking at the code, it appears that describe_task_definitions loops over the revisions without using the retry mechanism. This PR attempts to solve the problem by adding aws_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.

patchback[bot] avatar Jul 23 '24 11:07 patchback[bot]