One thing: you should consider building this on jed/dynamo-client[1] instead of jed/dynamo. I refactored the former out of the latter last week, adding exponential back-off retry and the ability to specify custom hosts for better testability. Also, I'll be refactoring jed/dynamo myself in the near future, which will introduce breaking some API changes.
[1] https://github.com/jed/dynamo-clientie, with scan, although more resource expensive than query, you can add filters on any keys, but you can't sort any of the data. With query you can, but only on the range key you specify, which is 1 per table. Also: it can't be changed after the table is created.
Seems like difficult problems to sort out for an ORM wrapper.
In your scan vs. query example I'd want to duplicate the data to two indicies ... and running both through a query call. If I can get even a decent amount of consistency this way (the real challenge to the multi-index problem using this method) for small/medium data sizes it would work and still be cost effective. At larger data sizes an application will most likely know which queries it needs to execute consistently in an indexed fashion and which could be farmed out through elastic map reduce.
As mentioned here:
https://forums.aws.amazon.com/thread.jspa?messageID=332629
Amazon is looking into these concerns and I'd like my abstraction to stay constant throughout the transition. (while informing the user as to what its actually doing)