def boto3_log(method):
 counter = itertools.count(1)
 def _run_with_logging(*args, **kwargs):
  '\n        Run given boto3.ec2.ServiceResource method with exception\n        logging for ``ClientError``.\n        '
  with AWS_ACTION(operation=[method.__name__, args[1:], kwargs], count=next(counter)):
   return method(*args, **kwargs)
 return _run_with_logging

def boto3_log ( method ) : counter = itertools . count ( 1 ) def _run_with_logging ( * args , ** kwargs ) : with AWS_ACTION ( operation = [ method . __name__ , args [ 1 : ] , kwargs ] , count = next ( counter ) ) : return method ( * args , ** kwargs ) return _run_with_logging
decorator to run a boto3 .