Amazon DynamoDB
Developer Guide (API Version 2012-08-10)

Low-Level Interfaces

Every language-specific AWS SDK provides a low-level interface for DynamoDB, with methods that closely resemble low-level DynamoDB API requests.

In some cases, you will need to identify the data types of the attributes using Data Type Descriptors, such as S for string or N for number.


A low-level interface is available in every language-specific AWS SDK.

The following Java program uses the low-level interface of the AWS SDK for Java. The program issues a GetItem request for a song in the Music table, and prints the year that the song was released.

The class implements the DynamoDB low-level interface.

package com.amazonaws.codesamples; import java.util.HashMap; import; import; import; import; import; public class MusicLowLevelDemo { public static void main(String[] args) { AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().build(); HashMap<String, AttributeValue> key = new HashMap<String, AttributeValue>(); key.put("Artist", new AttributeValue().withS("No One You Know")); key.put("SongTitle", new AttributeValue().withS("Call Me Today")); GetItemRequest request = new GetItemRequest() .withTableName("Music") .withKey(key); try { GetItemResult result = client.getItem(request); if (result != null) { AttributeValue year = result.getItem().get("Year"); System.out.println("The song was released in " + year.getN()); } else { System.out.println("No matching song was found"); } } catch (Exception e) { System.err.println("Unable to retrieve data: "); System.err.println(e.getMessage()); } } }