With DynamoDB, there are no servers to provision, patch, or manage, and no software to install, maintain, or operate. DynamoDB automatically scales tables to adjust for capacity and maintains performance with zero administration. Availability and fault tolerance are built in, eliminating the need to architect your applications for these capabilities.
DynamoDB provides capacity modes for each table: on-demand and provisioned.
Provisioned: for workloads that are less predictable for which you are unsure whether you'll have high utilization, on-demand capacity mode takes care of managing capacity for you, and you pay only for what you consume.
On-demand: DynamoDB instantly accommodates your workloads as they ramp up or down to any previously reached traffic level.
ACID transactions
Encryption at rest Point-in-time recovery PITR provides continuous backups of your DynamoDB table data, and you can restore that table to any point in time up to the second during the preceding 35 days. On-demand backup and restore You can back up tables from a few megabytes to hundreds of terabytes of data and not affect performance or availability to your production applications.In DynamoDB, a table is a collection of items, and each item is a collection of attributes. DynamoDB uses primary keys to uniquely identify each item in a table and secondary indexes to provide more querying flexibility. There is no limit to the number of items you can store in a table. Attributes in DynamoDB are similar in many ways to fields or columns in other database systems.
Each item in the table has a unique identifier, or primary key, that distinguishes the item from all of the others in the table.
Other than the primary key, tables are schemaless, which means that neither the attributes nor their data types need to be defined beforehand. Each item can have its own distinct attributes.
Items can have a nested attribute. DynamoDB supports nested attributes up to 32 levels deep. eg. item "Address" has attributes "street" and "city":
{
"Address": {
"street": "123 Main",
"city":"London",
}
}
A table can have a primary key composed of two attributes. The first attribute is the partition key, and the second attribute is the sort key. All items with the same partition key value are stored together, in sorted order by sort key value. In a table that has a partition key and a sort key, it's possible for multiple items to have the same partition key value. However, those items must have different sort key values.
Each primary key attribute must be a scalar (meaning that it can hold only a single value). The only data types allowed for primary key attributes are string, number, or binary. There are no such restrictions for other, non-key attributes.
You can create one or more secondary indexes on a table. A secondary index lets you query the data in the table using an alternate key, in addition to queries against the primary key. DynamoDB doesn't require that you use indexes, but they give your applications more flexibility when querying your data. After you create a secondary index on a table, you can read data from the index in much the same way as you do from the table.
DynamoDB supports two kinds of indexes:
-
Global secondary index – An index with a partition key and sort key that can be different from those on the table.
-
Local secondary index – An index that has the same partition key as the table, but a different sort key.
Every index belongs to a table, which is called the base table for the index.
When you create an index, you specify which attributes will be copied, or projected, from the base table to the index. At a minimum, DynamoDB projects the key attributes from the base table into the index.