Updating a table using the AWS SDK for .Net

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

Getting ready

You can use the IDE of your choice to code these recipes.

How to do it…

In this recipe, we will learn how to update the provisioned capacity of the already created table using the AWS SDK for .Net:

  1. Create an update table request and provide the new read and write capacity units:
    AmazonDynamoDBClient client = new AmazonDynamoDBClient();
    string tableName = "productTableNet";
    var request=new UpdateTableRequest(){
      TableName=tableName,
      ProvisionedThroughput = new ProvisionedThroughput(){
        ReadCapacityUnits=2,
          WriteCapacityUnits=2
      }
    };
  2. Invoke the updateTable method from the DynamoDB client to update the table with the provided ...

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.