DynamoDB Queries



We have a small IoT project underway using DynamoDB and it appears re:dash may offer exactly what we need. I have used your eu-west-1 AMI and updated it to the latest version, filled out the datasource with my DynamoDB connection information and I have used an IAM role with the instance as well as trying access keys. I think the connection is OK as when I run DQL queries from the command line it returns a result. However I cannot get the query tool in the web frontend to return anything. It either runs for < 1s and returns nothing or runs forever.

I am just trying something simple like SCAN * FROM rider;

I understand DynamoDB support is a recent addition and there is limited to no documentation. I would really appreciate some pointers on how to get some queries working please.

Many thanks!


What version are you currently running? Did you try checking the logs?



It’s version 0.10.1+b1836

I have checked the celery error log and there are Tracebacks deom /redash/query_runner/dynamodb_sql.py ParseException() errors followed by a ParceException: Expected {{“explain” Group : ({{“select” [“consistent”] + a huge lot more.



Hi, I have done some more poking and think maybe I had setup the connection wrongly as I was trying to use the AWS endpoint rather than the local version. If I point to the https endpoint I receive the following:

Error running query: InvalidSignatureException: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. The Canonical String for this request should have been ‘POST / content-type:application/x-amz-json-1.0 host:dynamodb.eu-west-1.amazonaws.com x-amz-date:20160627T072850Z x-amz-target:DynamoDB_20120810.DescribeTable content-type;host;x-amz-date;x-amz-target 3f92583e1105bd50ce02d21b7858424ad1a2945511da24a8c01343089657161f’ The String-to-Sign should have been ‘AWS4-HMAC-SHA256 20160627T072850Z 20160627/eu-west-1/dynamodb/aws4_request 127442537f3d3791e23fe83557d091cf5r4f5d6b55cd6e1ff4f0031f7b0cbf6’ Args: {‘TableName’: ‘Rider’}



In the version you have there was an issue with the DynamoDB query runner, when setting the host. See this pull request for reference: https://github.com/getredash/redash/pull/1059/files.

You can either modify the query runner locally not to require host or upgrade to the 0.11RC version



Thank you very much for that. I updated the file and It’s getting further now. I now have query errors which is hopefully just an issue with my query.

ProgrammingError: relation “posts” does not exist
LINE 1: …sh: bb0c12c54dce95ab884a409a17c5b7d8 */ SELECT * FROM posts;


I did an upgrade to RC 0.11 and it’s working now. Thank you for your help!


Great. Glad you got it working!