@Test
    public void howToHandle_UnprocessedKeys() throws InterruptedException {
        TableKeysAndAttributes tableKeysAndAttributes =
            new TableKeysAndAttributes(TABLE_NAME)
            .withAttrbuteNames("binary", "booleanTrue", "intAttr",
                    "mapAttr", "stringSetAttr")
            // you can add a bunch of keys in one go
            .addHashAndRangePrimaryKeys(
                HASH_KEY_NAME, RANGE_KEY_NAME,
                "foo",          1,
                "foo",          2,
                "foo",          3,
                "foo",          4,
                "foo",          5
                // etc.
            )
            ;
        // unprocessed items from DynamoDB
        int attempts = 0; 
        Map<String, KeysAndAttributes> unprocessed = null ;
        do {
            if (attempts > 0) {
                // exponential backoff per DynamoDB recommendation
                Thread.sleep((1 << attempts) * 1000);
            }
            BatchGetItemOutcome outcome;
            if (unprocessed == null || unprocessed.size() > 0) {
                // handle initial request
                outcome = dynamo.batchGetItem(tableKeysAndAttributes);
            } else {
                // handle unprocessed items
                outcome = dynamo.batchGetItemUnprocessed(unprocessed);
            }
            Map<String, List<Item>> tableItems = outcome.getTableItems();
            for (Map.Entry<String, List<Item>> e : tableItems.entrySet()) {
                System.out.println("tableName: " + e.getKey());
                for (Item item : e.getValue()) {
                    System.out.println("item: " + item);
                }
                Assert.assertTrue(e.getValue().size() == 5);
            }
            unprocessed = outcome.getUnprocessedKeys();
            System.out.println("unprocessed: " + unprocessed);
        } while (unprocessed.size() > 0);
    }
Sample code to perform batch get items from DynamoDB.
src/samples/AmazonDynamoDBDocumentAPI/quick-start/com/amazonaws/services/dynamodbv2/document/quickstart/H_BatchGetItemTest.java