Created
May 7, 2013 19:46
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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