Skip to content

Commit 048b617

Browse files
authored
docs: amazon-provider retry modes (#23906)
1 parent e656e1d commit 048b617

File tree

1 file changed

+64
-0
lines changed
  • docs/apache-airflow-providers-amazon/connections

1 file changed

+64
-0
lines changed

docs/apache-airflow-providers-amazon/connections/aws.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,70 @@ The following settings may be used within the ``assume_role_with_saml`` containe
194194
https://pypi.org/project/requests-gssapi/
195195

196196

197+
Avoid Throttling exceptions
198+
---------------------------
199+
200+
Amazon Web Services have quota limits for simultaneous API call as result with frequent calls
201+
``apache-airflow-providers-amazon`` components might fail during execution with a
202+
throttling exception, e.g. *ThrottlingException*, *ProvisionedThroughputExceededException*.
203+
204+
``botocore.config.Config`` supports different exponential backoff modes out of the box:
205+
``legacy``, ``standard``, ``adaptive``
206+
207+
By default, ``botocore.config.Config`` uses ``legacy`` mode with 5 maximum retry attempts,
208+
which may not be enough in some cases.
209+
210+
If you encounter throttling exceptions, you may change the mode to ``standard`` with more retry attempts.
211+
212+
213+
.. seealso::
214+
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html#retries
215+
216+
Set in Connection
217+
^^^^^^^^^^^^^^^^^
218+
219+
**Connection extra field**:
220+
.. code-block:: json
221+
222+
{
223+
"config_kwargs": {
224+
"retries": {
225+
"mode": "standard",
226+
"max_attempts": 10
227+
}
228+
}
229+
}
230+
231+
Set in AWS Config File
232+
^^^^^^^^^^^^^^^^^^^^^^
233+
234+
**~/.aws/config**:
235+
.. code-block:: ini
236+
237+
[awesome_aws_profile]
238+
retry_mode = standard
239+
max_attempts = 10
240+
241+
**Connection extra field**:
242+
.. code-block:: json
243+
244+
{
245+
"session_kwargs": {
246+
"profile_name": "awesome_aws_profile"
247+
}
248+
}
249+
250+
Set by Environment Variables
251+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
252+
.. note:: This sets the retry mode on all connections,
253+
unless another retry config is explicitly set on a specific connection.
254+
255+
.. code-block:: bash
256+
257+
export AWS_RETRY_MODE=standard
258+
export AWS_MAX_ATTEMPTS=10
259+
260+
197261
.. _howto/connection:aws:session-factory:
198262

199263
Session Factory

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy