DynamoDB best practices are as follows:
- Create a primary key that spans multiple partitions. Choose the primary key that has more distinct values. If the number of distinct values is less in a primary key attribute, items may be distributed in a limited number of partitions instead of all available partitions.
- In DynamoDB, each item can have a maximum size of 400 KB; however, in a table, there is no limit on the number of items. To efficiently store large items in a table, use one of the mechanisms, such as a one-to-many table, multiple tables to support varied access patterns, compress large attribute values, store large attribute values in Amazon S3, or break up large attributes across multiple items.
- By default, Scan reads the entire table with all items and consumes more throughput. Use Query instead of Scan, as it is more economical.
- Create LSIs for...