I am currently using Java dynamoMapper to create and query the table. When trying to create a table with a global secondary index, I get the following error
No provisioned throughput specified for the global secondary index
My java class representing the table has this attribute for the global secondary index.
@DynamoDBIndexHashKey(globalSecondaryIndexName="sender")
public String getSender() {
return sender;
}
Class to create table looks like this
public boolean createTable() {
try {
DynamoDBMapper mapper = new DynamoDBMapper(client);
CreateTableRequest tableRequest = mapper.generateCreateTableRequest(entityClass); // 1
tableRequest.setProvisionedThroughput(new ProvisionedThroughput(1000L, 1500L)); // 2
client.createTable(tableRequest); // 3
} catch (Error e) {
e.printStackTrace();
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
I have searched the Amazon site for adding annotations and configuration but nothing came up for DynamoMapper. Is there any way to do this using ORM or will I have to manually create by using a lower-level API?