* The expected hashkey for the Amazon DynamoDB table
* @return true if the Amazon DynamoDB table exists and the expected hashkey matches the table schema,
* otherwise return false
*/
private static boolean tableHasCorrectSchema(AmazonDynamoDBClient client, String tableName, String key) {
DescribeTableRequest describeTableRequest = new DescribeTableRequest();
describeTableRequest.setTableName(tableName);
DescribeTableResult describeTableResult = client.describeTable(describeTableRequest);
TableDescription tableDescription = describeTableResult.getTable();
if (tableDescription.getAttributeDefinitions().size() != 1) {
LOG.error("The number of attribute definitions does not match the existing table.");
return false;