Description
I'm using the object persistent model, the name of the DynamoDB table is also dynamic. My queries currently function however when using X-Ray I'm noticing an exception that is occurring after the query.
In my object I am not using the DynamoDBTable attribute because the table name is dynamic. I'm using the DynamoDBOperationConfig and setting the OverrideTableName property.
When excuting QueryAsync the query returns results but X-Ray shows the following
The error that is occurring is ...not authorized to perform: dynamodb:DescribeTable on resource: arn:aws:dynamodb:ca-central-1:xxxxxxxxx:table/T where T is the name of the object and not the table.
using (DynamoDBContext context = new DynamoDBContext(AmazonDynamoDB))
{
DynamoDBOperationConfig config = new DynamoDBOperationConfig
{
OverrideTableName = “TableName”,
IndexName = “IndexName”
};
AsyncSearch<ObjectType> query = context.QueryAsync<ObjectType>(“HashKey”, config);
IEnumerable<ObjectType> objects = await query.GetRemainingAsync();
}
I'm not sure how to handle this exception. I've tried to set the DynamoDBTable however the error simply changes to the name I provide instead of the objects Name. Not sure what else I'm missing.
Regards
Artin