ansible/ansible-modules-core — pull request #224 by semifocused (2014-10-25 07:30:27+00:00)
Title: add retry with exponential backoff when we receive throttling error code...

... from cloudformation

Occasionally when polling for completion of the creation or deletion of a CloudFormation stack, AWS will return an exception indicating that a rate limit has been exceeded and throttling is occurring. It looks like this:
```
boto.exception.BotoServerError: BotoServerError: 400 Bad Request

Sender
Throttling
Rate exceeded

2ab5db0d-5bca-11e4-9592-272cff50ba2d

```

This can be avoided by retrying the operation repeatedly with an exponential backoff up to a max number of retries.

This PR implements such a retry for all describe_stacks operations within the cloudformation module.

retry is only invoked when the error code received indicates throttling is occurring, otherwise the exception is re-raised to maintain prior functionality.