What is DynamoDB?#
DynamoDB is Amazon’s proprietary NoSQL database service. First released in 2012, DynamoDB supports two types of NoSQL data: key-value and document-oriented. It has similar functionality to MongoDB, though it is only usable through Amazon Web Services (AWS), making it less than ideal for users who aren’t working with AWS services.
Given how common AWS is, there are plenty of reasons to use Amazon DynamoDB. Though less flexible in where you can deploy it, DynamoDB has smoother integration with other tools and services found in AWS. MongoDB allows users tighter control over their databases, but it also requires users to actively manage their configurations and infrastructure, which can take up precious development time. DynamoDB, however, uses AWS to manage updates, scaling, and availability, making the setup process quick and simple. You also won’t have to worry about keeping servers and backups running. Finally, AWS DynamoDB’s out-of-the-box security features are solid, thanks to being part of AWS and not being directly accessible via the internet.
Unfortunately, DynamoDB has more issues than just its limited deployment capability. Its querying capabilities aren’t great, and it only allows three data types for primary keys: string, number, and binary. (It does support many different data types for other attributes within a table.)
Furthermore, DynamoDB uses a throughput model for pricing and data processing by default. With this model, you estimate your read/write capacity needs before the service can appropriate the resources. In cases where you don’t really know your expected read/write volumes, you might under- or overestimate your needs, which can lead to batch-processing failures. Of course, you can use the on-demand pricing model to work around this, and DynamoDB will automatically accommodate your workloads as they ramp up or down. But that comes with the risk of bill spikes if your project’s traffic ends up higher than initially expected.