Creating a table using the AWS SDK for .Net

Now, let's understand how to create a DynamoDB table using the AWS SDK for .Net.

Getting ready

You can use an IDE, such as Visual Studio to code these recipes. You can refer to the AWS documentation on how to set up your workstation at http://aws.amazon.com/sdk-for-net/.

How to do it…

Let's start with creating a table called productTableNet:

  1. Instantiate the CreateTable request specifying AttributeDefinition and KeySchema. We will create the table having both the HASH and RANGE Keys. We will set the provisioned read and write capacity units to be one:
    AmazonDynamoDBClient client = new AmazonDynamoDBClient(); string tableName = "productTableNet"; var request=new CreateTableRequest{ AttributeDefinitions=newList<AttributeDefinition>(){ ...

Get DynamoDB Cookbook 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.