2 Answers
- Newest
- Most votes
- Most comments
0
Would increasing this quota solve most of this throttling issue? Quotas related to API action throttling
0
I encountered the same issue as you, and here’s how I solved it. In the Lambda function, I defined a custom exception class, for example:
class GlueThrottlingException(Exception): pass
In places where errors might occur, I performed error handling and raised this custom exception based on the logic, for example:
except ClientError as e: logger.info(e.response['Error']['Code']) logger.info(e.response['Error']['Message']) if e.response['Error']['Code'] == 'ThrottlingException': raise GlueThrottlingException(e.response['Error']['Message']) from e else: raise e
This way, in the Step Function, you can directly catch the error using the class name, for example:
"Retry": [ { "ErrorEquals": [ "GlueThrottlingException" ], "IntervalSeconds": 1, "MaxAttempts": 3, "BackoffRate": 2 } ]
answered 2 years ago

I looked into a quota increase, but that seems a bit like a cop-out on our end, and also potentially unreliable. My experience has been that rate limiting and error handling are far more scalable than adding capacity.
Rather than increasing the quota and hoping we don't exceed the new one, I'd much rather do some rate limiting and/or throttling retrying in the Step Function itself. Some (not all) of this can be achieved with batching when the Step Function is mapping over a list of inputs, but in this case, it's thousands of simultaneous executions processing one input each.
I was thinking that a quota increase would make the throttling exception an exception. It would still need to be handled but not something that was normal. Sorry, I didn't really answer your original question.