What does "Unable to find storage information for property" mean when using DynamoDB?

Viewed 2736

I'm running a scan using the .NET SDK for AWS DynamoDB. I'm doing this:

var result = context.Scan<Table>(new[] { new ScanCondition("AttributeName", ScanOperator.Equal, variable) }

This throws the exception

"Unable to find storage information for property [AttributeName]"

The attribute AttributeName is a non-indexed attribute that currently has mostly no value in it (it's a new attribute I added recently).

I googled the error & all I came up with was the sdk source code, which I could dive into, and I will if noone here can enlighten me.

3 Answers

This got me too, sharing my findings hoping it could help someone, I am using C# Object persistent model.

Column names in DynamoDb are in Camel case. C# class properties are not.

[DynamoDBProperty("artist")]
    [DynamoDBHashKey]
    public string Artist { get; set; }

    [DynamoDBProperty("songTitle")]
    [DynamoDBRangeKey]
    public string SongTitle { get; set; }
    

Therefore following throws the error,

scanConditions.Add(new ScanCondition("songTitle", ScanOperator.BeginsWith, searchReq.SongTitle));
            if (!string.IsNullOrEmpty(searchReq.Difficulty))

To fix,

scanConditions.Add(new ScanCondition("SongTitle", ScanOperator.BeginsWith, searchReq.SongTitle));
            if (!string.IsNullOrEmpty(searchReq.Difficulty))
Related