I would like to connect to an ElastiCache cluster (running Redis) with Redis Insight from my Mac.
I am able to connect using redis-cli
, but with Redis Insight I get the following error: ‘The connection has timed out, please check the connection details’.
Connection details
Since the cluster is in VPC and cannot be directly accessed outside of AWS, I use an SSH tunnel via an EC2 instance in the same VPC. Here’s the command I use to set up a tunnel with port forwarding:
ssh -vvvL 35000:my-elasticache-cluster-0001-001.liabv9.0001.use1.cache.amazonaws.com:6379 -i ~/.ssh/my-ssh-key ec2-user@dmy-ec2-instance
It works just fine and I am able to connect to the cluster from terminal using redis-cli
:
~ > redis-cli -u redis://localhost:35000
localhost:35000> PING
PONG
localhost:35000>
I can then run various Redis commands, so all good here.
But if I try to connect to localhost:35000
with Redis Insight, it keeps timing out.
Any suggestions? Does Redis Insight require additional ports or protocols to be forwarded, except the one I’m connecting to?