Creating a table using the AWS SDK for Java

Let's start with creating a table in DynamoDB using SDKs provided by Amazon.

Getting ready

To program various DynamoDB table operations, you can use the IDE of your choice, for example, Eclipse, NetBeans, Visual Studio, and so on. Here, we will be using the Eclipse IDE. In the previous chapter, we have already seen how to download and set up the Eclipse IDE.

How to do it…

Let's first see how to create a table in DynamoDB using the AWS SDK for Java.

You can create a Maven project and add the AWS SDK Maven dependency. The latest version available can be found at http://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk/.

Here, I will be using Version 1.9.30, and its POM looks like this:

<dependency> <groupId>com.amazonaws</groupId> ...

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.