title: storing data in dynamodb: slow process
body: <p>I am trying to store a pandas dataframe with around 70k rows in dynamodb.
  I am using the following process:</p>
  <pre><code>#initial schema
  primary_key='column1'
  order_key='column2'
  keyschema = [{'AttributeName': primary_key, 'KeyType': 'HASH'}, {'AttributeName': order_key, 'KeyType': 'RANGE'}]
  attributesdefinitions = [{'AttributeName': primary_key, 'AttributeType': 'S'}, {'AttributeName': order_key, 'AttributeType': 'S'}]    
  
  #create table
  dynamodb_client = boto3.client('dynamodb', region_name='eu-north-1')
  _ = dynamodb_client.create_table(
          TableName='tablename',
          KeySchema=keyschema,
          AttributeDefinitions=attributesdefinitions,
          ProvisionedThroughput={'ReadCapacityUnits': 5, 'WriteCapacityUnits': 5})
  dynamodb_client.get_waiter('table_exists').wait(TableName='tablename')
  
  #store data
  dynamodb = boto3.resource(&quot;dynamodb&quot;, region_name='eu-north-1')
  dynamodb_table = dynamodb.Table('tablename')
  with dynamodb_table.batch_writer() as batch:
      for index, row in pandas_df.iterrows():
          batch.put_item(Item={'column1': row['column1'],
                               'column2': row['column2'],
                               'anothercolumn': row['column3'])
  </code></pre>
  <p>It works but for these 70000 rows its running like 5 hours now and havent finished.
  If I increase the <code>WriteCapacityUnits</code> I assume it will take less time but costs increases. But this writing process is scheduled once per week. So I dont want to pay for higher writecapacity when most of the time will be only for reading this table.
  But gennerally it seems super slow for just 70k rows. Any insights?</p>
  <p><strong>edit</strong></p>
  <p>write plot(write goes to zero cause i stopped the process):</p>
  <p><a href="https://i.stack.imgur.com/XKoRQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XKoRQ.png" alt="enter image description here" /></a></p>
  <p>throttling plot(at around 14:00 i changed to writecapacity from 5 to 10):</p>
  <p><a href="https://i.stack.imgur.com/Y8dr7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y8dr7.png" alt="enter image description here" /></a></p>