DynamoDB Transactions

  • Implementation of Database transaction concept in SQL which guarantee all or nothing to satisfy ACID
  • Transaction can be both in
    • Read Modes
    • Write Modes
  • Consumes 2x WCUs and RCUs
    • DynamoDB performs 2 operations for every item (prepare & commit)
  • Two operations (up to 25 unique items or 4MB of data)
    • TransactGetItems: one or more GetItem operations
    • TransactWriteItems: one or more PutItem, UpdateItem and DeleteItem operations

Example
3 transactional writes per second with item size 5 KB

  • $3 * 5\frac{\text{5 KB}}{\text{1 KB}} * 2(\text{transactional cost}) = 30 \text{ WCUs}*$
  • Because WCUs can write 1KB

5 transactional read per second with item size 5 KB

  • $5 * 2 * 2 \text{(transactional cost)} = 20 \text{ RCUs}$
  • we times 2 because 1 RCU can only read 4 KB. So we need 2 RCU for 1 item