Issue connecting to DynamoDB

Issue Summary

Dynamo DB issue UnrecognizedClientException: The security token included in the request is invalid. Args: {‘Limit’: 100}

A summary of the issue and the browser/OS environment in which it occurs.

Technical details:

  • Redash Version:
  • Browser/OS:
  • How did you install Redash: docker image

That error suggests that you haven’t saved correct authentication information with Redash. Perhaps the Secret Key you provided while setting up the Dynamo data source is either invalid or out of date. Can you regenerate this key inside your AWS admin controls?

Hi All

I am getting below log for a connection with Dynamodb … It is unsuccessful

My observation is i am not able to see the secret key that i have passed in log … I am able to see only the access key in logs …

server_1 | /
server_1 |
server_1 | content-type:application/x-amz-json-1.0
server_1 |
server_1 | x-amz-date:20190620T175655Z
server_1 | x-amz-target:DynamoDB_20120810.ListTables
server_1 |
server_1 | content-type;host;x-amz-date;x-amz-target
server_1 | fba740ad2f35be4ee5ba8d6914f8e30e4036b3f1ee3a8ace131e95b6bbe0146b
server_1 | [2019-06-20 17:56:55,050][PID:11][DEBUG][botocore.auth] StringToSign:
server_1 | AWS4-HMAC-SHA256
server_1 | 20190620T175655Z
server_1 | 20190620/us-east-1/dynamodb/aws4_request
server_1 | 483e9e8fe0dec19a756374f6b17459affdb8f7479b912db22f845915c7b7fd9b
server_1 | [2019-06-20 17:56:55,051][PID:11][DEBUG][botocore.auth] Signature:
server_1 | aa4279150bbd65b076a62cdb69f9052f1c90a73e4776f31b0025587caac08e11
server_1 | [2019-06-20 17:56:55,051][PID:11][DEBUG][botocore.endpoint] Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=, headers={‘Content-Length’: ‘14’, ‘X-Amz-Target’: ‘DynamoDB_20120810.ListTables’, ‘X-Amz-Date’: ‘20190620T175655Z’, ‘User-Agent’: ‘Botocore/1.12.115 Python/2.7.12 Linux/4.9.125-linuxkit’, ‘Content-Type’: ‘application/x-amz-json-1.0’, ‘Authorization’: 'AWS4-HMAC-SHA256 Credential=XXXXXXXXXXXXXX/20190620/us-east-1/dynamodb/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=xxxxxxxxxxxxxxxx’}>
server_1 | [2019-06-20 17:56:55,053][PID:11][DEBUG][urllib3.util.retry] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
server_1 | [2019-06-20 17:56:55,053][PID:11][DEBUG][urllib3.connectionpool] Starting new HTTPS connection (1):
server_1 | [2019-06-20 17:56:55,408][PID:11][DEBUG][urllib3.connectionpool] “POST / HTTP/1.1” 400 132
server_1 | [2019-06-20 17:56:55,409][PID:11][DEBUG][botocore.parsers] Response headers: {‘x-amzn-RequestId’: ‘23KMT57SF44K7D08IIRU2MUFORVV4KQNSO5AEMVJF66Q9ASUAAJG’, ‘Content-Length’: ‘132’, ‘Server’: ‘Server’, ‘Connection’: ‘keep-alive’, ‘x-amz-crc32’: ‘3880715766’, ‘Date’: ‘Thu, 20 Jun 2019 17:56:55 GMT’, ‘Content-Type’: ‘application/x-amz-json-1.0’}
server_1 | [2019-06-20 17:56:55,410][PID:11][DEBUG][botocore.parsers] Response body:
server_1 | {"__type":“”,“message”:“The security token included in the request is invalid.”}
server_1 | [2019-06-20 17:56:55,411][PID:11][DEBUG][botocore.hooks] Event needs-retry.dynamodb.ListTables: calling handler <botocore.retryhandler.RetryHandler object at 0x7fe52a321490>
server_1 | [2019-06-20 17:56:55,411][PID:11][DEBUG][botocore.retryhandler] No retry needed.
server_1 | [2019-06-20 17:56:55,436][PID:11][INFO][metrics] method=POST path=/api/data_sources/1/test endpoint=datasourcetestresource status=200 content_type=application/json content_length=133 duration=543.79 query_count=4 query_duration=7.32

I am able to connect to Prostgres RDS from my local machine to AWS through Redash.I see the dynamodb connecting is failing for invalid secret key however i can access the same dynamodb in AWS using AWS cli from local machine with same keys