With a single BatchGetItem request the maximum number of items to get is 100, as documented by AWS:
A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items.
if ( !requestItems.containsKey(tableName) ) {
requestItems.put(
tableName,
new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
new LinkedList
// Reach the maximum number which can be handled in a single batchGet
if ( ++count == 100 ) {
processBatchGetRequest(classesByTableName, requestItems, resultSet, config);
requestItems.clear();
count = 0;
}
}