Part 1 - Set up DynamoDB

You will use DynamoDB as the database for the basket microservice.

Create a DynamoDB Table

  1. In the AWS Management Console, navigate to the DynamoDB.

    Navigating to DynamoDB Console

  2. Click the “Create table” button in the center of the screen.

    DynamoDB Console Screen Button

  3. For “Table name”, enter UnicornBasket. For “Primary key”, enter user_id. Click on “Add sort key” and enter basket_id. The data type for both keys is String. For the purpose of the lab, we will use default settings to configure the table. However, you have the ability to configure secondary indexes, read/write capacities, encryption, auto scaling, and encryption. Click “Create Table”.

    Configure DynamoDB Table

    That’s it - you have successfully created a DynamoDB table! If you go to the “Items” tab you can see and filter through all the items in your table; however, the table is currently empty.

    Created Table Display

    Empty Items Table

  4. If the DynamaDB table looks good, let’s move on to the next part.