BatchClientHookAsync
Astronomer ProvidersAsync client for AWS Batch services.
Access Instructions
Install the Astronomer Providers provider package into your Airflow environment.
Import the module into your DAG file and instantiate it with your desired params.
Parameters
Documentation
Async client for AWS Batch services.
Note
Several methods use a default random delay to check or poll for job status, i.e. random.sample()
Using a random interval helps to avoid AWS API throttle limits when many concurrent tasks request job-descriptions.
To modify the global defaults for the range of jitter allowed when a random delay is used to check Batch job status, modify these defaults, e.g.:
BatchClient.DEFAULT_DELAY_MIN = 0 BatchClient.DEFAULT_DELAY_MAX = 5
When explicit delay values are used, a 1 second random jitter is applied to the delay . It is generally recommended that random jitter is added to API requests. A convenience method is provided for this, e.g. to get a random delay of 10 sec +/- 5 sec: delay = BatchClient.add_jitter(10, width=5, minima=0)