title: How to retry DynamoDb write when throttled?
body: <p>I am trying to write large amounts of data to dynamo using AmazonDynamoDBAsyncClient and I am trying to understand what the best practice of handling throttling is?</p>
  
  <p>For example, I have a capacity of 3000 writes and at a given moment I have, let's say, 100,000 records I'd like to write.  I don't need them all in immediately, but I am trying to figure what the best way to get them in is.</p>
  
  <p>This application is running in a distributed environment so there maybe 5 executors all trying to do this at the same time.  Would the best way to handle this be this way?  Where I sleep the write process should we hit the throttle?  Or should I be doing something to avoid the throttle completely.  In fact, is my code even doing what I think it is, which is retrying the data after waiting a second?  </p>
  
  <pre><code>try{
     amazonDynamoAsyncDb.updateItemAsync(updateRequest)
     }catch{
       case e: ThrottlingException =&gt; {
          Thread.sleep(1000)
          //retry here, but how?
          }
     }
  </code></pre>