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:
- Log in to your account and go to the DynamoDB dashboard. Click Create table.
- 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:
- Uncheck Use default settings.
- For Read-write capacity mode, choose On-demand ...