Link Search Menu Expand Document

Image from @awsgeek

DynamoDB

DynamoDB Basics

  • ๐Ÿ“’ Homepage โˆ™ Developer guide โˆ™ FAQ โˆ™ Pricing
  • DynamoDB is a NoSQL database with focuses on speed, flexibility, and scalability.
  • DynamoDB is priced on a combination of throughput and storage.

DynamoDB Alternatives and Lock-in

  • โ›“ Unlike the technologies behind many other Amazon products, DynamoDB is a proprietary AWS product with no interface-compatible alternative available as an open source project. If you tightly couple your application to its API and featureset, it will take significant effort to replace.
  • The most commonly used alternative to DynamoDB is Cassandra.

DynamoDB Tips

DynamoDB Gotchas and Limitations

  • ๐Ÿ”ธ DynamoDB doesnโ€™t provide an easy way to bulk-load data (it is possible through Data Pipeline) and this has some unfortunate consequences. Since you need to use the regular service APIs to update existing or create new rows, it is common to temporarily turn up a destination tableโ€™s write throughput to speed import. But when the tableโ€™s write capacity is increased, DynamoDB may do an irreversible split of the partitions underlying the table, spreading the total table capacity evenly across the new generation of tables. Later, if the capacity is reduced, the capacity for each partition is also reduced but the total number of partitions is not, leaving less capacity for each partition. This leaves the table in a state where it much easier for hotspots to overwhelm individual partitions.
  • ๐Ÿ”ธ It is important to make sure that DynamoDB resource limits are compatible with your dataset and workload. For example, the maximum size value that can be added to a DynamoDB table is 400 KB (larger items can be stored in S3 and a URL stored in DynamoDB).
  • ๐Ÿ”ธ Dealing with time series data in DynamoDB can be challenging. A global secondary index together with down sampling timestamps can be a possible solution as explained here.
  • ๐Ÿ”ธ DynamoDB does not allow an empty string as a valid attribute value. The most common work-around is to use a substitute value instead of leaving the field empty.
  • ๐Ÿ”ธ When setting up fine grained policies for access to DynamoDB tables, be sure to include their secondary indices in the policy document as well.