Creating a DynamoDB table

  1. To create a DynamoDB table, we can simply open up the DynamoDB Dashboard and select Create table:

  1. In the Create DynamoDB table dialog, we will need to assign a name and a primary key. Optionally, we can select Add sort key and add a sort key to our table if our data model requires it:

  1. We also have the ability to deselect Use default settings; this will give us the ability to customize the table while we are provisioning it. Customizing the table gives us the ability to select read/write capacity mode and create secondary indexes. To create a secondary index, click on +Add index:

  1. In the Add index dialog, we need to select the primary key. Using the same key would create a local secondary index, while adding a new primary key will add a global secondary index. We can also add a sort key to the table and we will of course have to name it. We can also select the attributes we would like to project into the index:

  1. Further down, we can customize the provisioned capacity if we selected provisioned capacity mode and add the read and write capacity units. We can also configure capacity autoscaling, which we will discuss in the DynamoDB provisioned throughput section of this chapter:

  1. We are also able to select a role for Auto Scaling or use the DynamoDB AutoScaling Linked Role. Right at the bottom of the dialog, we are able to select the encryption and decide whether we want to use the default encryption key or use our own CMK from the KMS service. After we have completed the customization, we can click Create to create the table:

  1. Once the table is provisioned, we can manage it from the DynamoDB management console and address it via the CLI and SDK:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.233.205