private static TableDescription waitForTableDescription(final DynamoDbClient dynamo,
                                                            final String tableName,
                                                            final TableStatus desiredStatus,
                                                            final int timeout,
                                                            final int interval)
        throws Exception {
        val startTime = System.currentTimeMillis();
        val endTime = startTime + timeout;

        val tableRequest = DescribeTableRequest.builder().tableName(tableName).build();
        TableDescription table = null;
        while (System.currentTimeMillis() < endTime) {
            try {
                table = dynamo.describeTable(tableRequest).table();
                if (desiredStatus == null || table.tableStatusAsString().equals(desiredStatus.toString())) {
                    return table;
                }
            } catch (final ResourceNotFoundException rnfe) {
                LOGGER.trace(rnfe.getMessage());
            }
            Thread.sleep(interval);
        }
        return table;
    }
Gets records by keys.

@param <T>            the type parameter
@param dynamoDbClient the dynamo db client
@param tableName      the table name
@param count          the count
@param queries        the queries
@param itemMapper     the item mapper
@return the records by keys
support/cas-server-support-dynamodb-core/src/main/java/org/apereo/cas/dynamodb/DynamoDbTableUtils.java