How to do it...

In this recipe, you will create a DyanamoDB table to hold user account records, and you will add a global secondary index (GSI) to allow fast lookups by email address. GSIs give you an additional way to sort the data in your table, which allows for some degree of design flexibility after the table has been created:

  1. Log in to your account and go to the DynamoDB dashboard. Click Create table.
  2. Give the table a unique name and then enter UserID as the Partition key. A primary key in DynamoDB is either a partition key by itself or the combination of a partition key and a sort key. In this case, we will leave the sort key blank:
Create DynamoDB table
  1. Uncheck Use default settings.
  2. For Read-write capacity mode, choose On-demand ...

Get AWS SysOps Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.