In DynamoDB, you can create and use a secondary index for similar purposes.
Indexes in DynamoDB are different from their relational counterparts. When you create a secondary index, you must specify its key attributes—a partition key and a sort key. After you create the secondary index, you can Query it or Scan it just as you would with a table. DynamoDB does not have a query optimizer, so a secondary index is only used when you Query it or Scan it.
DynamoDB supports two different kinds of indexes:
Global secondary indexes – The primary key of the index can be any two attributes from its table.
Local secondary indexes – The partition key of the index must be the same as the partition key of its table. However, the sort key can be any other attribute.