Can I query DAX (DynamoDB Accelerator) from an EC2 instance?

966 views Asked by At

Can someone help me out? I am trying to query DAX from EC2 to see how fast it is when they are in the same region (us-east-1)

    aws dynamodb query --endpoint-url \
    http://mydax.abcd.clustercfg.dax.use1.cache.amazonaws.com:8111 \
    --table-name test_1.0 --key-condition-expression 
    ...

security group of DAX has 80/443/8111 port open

I am getting this error:

2018-09-12 12:43:59,678 - MainThread - botocore.endpoint - DEBUG - Exception received when sending HTTP request.

Traceback (most recent call last):

File "/home/ubuntu/.local/lib/python2.7/site-packages/botocore/endpoint.py", line 174, in _get_response

http_response = self._send(request)

File "/home/ubuntu/.local/lib/python2.7/site-packages/botocore/endpoint.py", line 218, in _send

return self.http_session.send(request)

File "/home/ubuntu/.local/lib/python2.7/site-packages/botocore/httpsession.py", line 260, in send

raise SSLError(endpoint_url=request.url, error=e)

SSLError: SSL validation failed for http://mydax.abcd.clustercfg.dax.use1.cache.amazonaws.com:8111/ EOF occurred in violation of protocol (_ssl.c:590)

Any hint guys?

1

There are 1 answers

0
Abdelrahman Elhaddad On BEST ANSWER

You can't use AWS DynamoDB CLI to connect to DAX clusters. DAX uses a custom binary protocol that is not based on http. DAX has its own clients which you can find here.