Database Reference
In-Depth Information
Item size calculations
Item size in DynamoDB is calculated by adding all attributes' names and their respective
values. In Chapter 1 , Getting Started , we have seen how read and write capacity units are
calculated, where we said that each read operation of DynamoDB is of size 4 KB and each
write operation of 1 KB. So it makes sense to design the attributes in such a manner that
each read request should get the data size which is a multiple of 4 KB, as even if you read 3
KB, DynamoDB would round it up to 4 KB; the same is the case for write operations,
which should write the data in multiples of 1 KB.
Tip
In order to optimize the read and write capacity units, you should try to reduce the item
size. One good practice to reduce the item size is to reduce the size of the attribute name/
length. For example, instead of having the attribute name as yearOfPublishing, you should
use the acronym yop.
Now that we have understood special features of Items in DynamoDB, let's learn how to
manipulate items using the AWS SDK using Java, .NET, and PHP APIs.
Search WWH ::




Custom Search