From 71e22357794a41aa53059bc46622062259ef737b Mon Sep 17 00:00:00 2001 From: Oussema CHERNI Date: Thu, 26 Jul 2018 16:23:43 +0200 Subject: [PATCH] Increase boto client max attempts to 10 instead of 4 --- brume/boto_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/brume/boto_client.py b/brume/boto_client.py index ebdcd5a..d723755 100644 --- a/brume/boto_client.py +++ b/brume/boto_client.py @@ -1,6 +1,7 @@ """Boto clients.""" import boto3 +from botocore.config import Config from botocore.exceptions import ClientError @@ -8,7 +9,12 @@ def boto_client(service, region=None): """ Instanciate boto client for specified service and region """ - return boto3.client(service, region_name=region) + config = Config( + retries=dict( + max_attempts=10 + ) + ) + return boto3.client(service, region_name=region, config=config) def cfn_client(region):