Skip to content

Instantly share code, notes, and snippets.

@mulka
Created May 7, 2013 19:46
Show Gist options
  • Save mulka/5535539 to your computer and use it in GitHub Desktop.
Save mulka/5535539 to your computer and use it in GitHub Desktop.
Here's a little script I wrote to increase the throughput of a DynamoDB table by doubling it, then waiting, then doubling, until it gets to where you want it to be.
#!/usr/bin/env python
import sys
import time
import boto
conn = boto.connect_dynamodb()
table = conn.get_table('table_name')
while table.read_units < 512:
table.update_throughput(table.read_units*2, table.write_units)
table.refresh(wait_for_active=True)
print 'Current read units:', table.read_units
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment