I'm using DynamoDb v2 interface for boto to make counter increments in my table. (I need v2 interface as I'll be dealing with indexes later on)
Somehow I'm not able to find how to do that without fetching item & updating it again.
Here is the code I'm using
from boto.dynamodb2.table import Table
from boto.dynamodb2.items import Item
my_table = Table('my-table')
# Update counter for existing record.
data = {'key': 'my_key',
'range_key': 'my_range',
}
item = Item(my_table, data)
#### Do something here to increment 'counter' by 1
item.save()
What should I do to increment a 'counter' field??