Search code examples
dictionaryamazon-dynamodbcost-management

cost to update dictionary in dynamodb?


I am wondering if I have a field in my DynamoDB that has a dictionary of size 1KB, and I update one of the key-value pairs in my dictionary by iterating a number forward by '1', will amazon charge me for the 8 bytes it takes to write an integer, or will amazon charge me a 1KB write operation to change a small subset of my dictionary?


Solution

  • Any write operation in Dynamo consumes at least 1 write unit, so for a 1KB (or smaller) object you'd consume 1 write unit even if incrementing a counter. But if the item is 2KB you'll consume 2 write units.

    Writes Number of item writes per second × 1 KB item size

    http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html#ProvisionedThroughputIntro.Writes