I am using DynamoDB. I do scan operations from the app. Everything works perfect. After sometime, the response is coming as nil. But I am not receiving any exceptions. I enabled verbose logging using,
[AmazonLogger verboseLogging];
If the verbose logging is enabled, I can see some logs like,
"__type":"com.amazonaws.dynamodb.v20111205#ProvisionedThroughputExceededException","message":"The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API"
My code looks like this,
@try {
DynamoDBScanRequest *request = /* Create request */;
DynamoDBScanResponse *response = [[AmazonClientManager ddb] scan:request];
/*
* response is nil if the provisioning throughput is exceeded
* and the all retries are over
*/
ALog(@"Response: %@", response);
NSMutableArray *array = response.items;
return array;
} @catch (NSException *exception) {
/*
* I am expecting the ProvisionedThroughputExceededException
* to be thrown here. But its not throwing here. Instead I get the response
* as nil above.
*/
ALog(@"Exception: %@", exception);
return nil;
}
Am I doing it correct? Could someone help me please?
Thanks.
Edit: Could anyone give me a rough idea of how much throughput (both read/write) capacity to set for a QuestionAnswer table, with almost 10 fields like TopicID, QuestionID, Question, Answer, AskedAt, RepliedAt, QuestionType etc.,? Thanks.