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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.