Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

DynamoDB Transaction Charges

Do DynamoDB transaction charge per write of the individual record, or does it charge based upon the charge of the overallsize?

I am making a chat application where I want to store each of the user’s chatrooms in a record so that when the user logs in, I can do a getItem with their username, rather than a scan for each of the chatrooms they are a part of. I am using Appsync as the API for the service. When a new chatroom is create by the user, I would append a uuid to each of the users added to the chat.

DynamoDB does not support batchUpdates, but does support Transactions, where I can batch multiple updates together. If I were to run DynamoDB updates through a loop to append the uuid, each of the updates would be rounded up to 1kb charge per user. If the transaction charges based upon the size of the transaction bundled together, the charges would be less since it would round up the total transaction, instead of the parts.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Transact writes (and all writes in fact) are per individual item. It’s only Query and Scan calls where the cost is based on the total full payload returned.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading