Create distributed semaphores to control concurrent invocations of contentious work using AWS Step Functions, Amazon DynamoDB, and AWS Cloud Development Kit.
I recently used this with a distributed map state that called Amazon Bedrock. I needed to ensure that only one execution runs at a time. Each execution takes multiple minutes, so polling every three seconds is excessive. In that case, I would have liked to have it wait one minute.
Proposal
Add a prop named wait that takes a Duration and use that in waitToGetLock.