AWS : Inspect Redis Elasticache Cluster on Local Machine

  1. Launch amazin-linux ec2 server and create a security group on same VPC as your elasticache cluster. Expost port 22 / shh inbound.
  2. Assuming you have your AWS credentials prepped, run the following to create a tunnel to your redis server on port 9999 of your local machine: ssh -i ~/.ssh/{creds}.pem -L 9999:{remote-redis-host}:{remote-redis-port} ec2-user@{ec2-public-dns-name}
  3. You can confirm this works by connecting from your local machine: redis-cli -p 9999

Alternatively you could just install redis-cli on the ec2 instance and run commands from there without tunnelling…

Inspecting Elasticache cluster with Redis Commander

Once you have the tunnel setup, get docker installed on your local machine and launch redis commander like so:

docker run --rm --name redis-commander -d \                                                                              
   --env REDIS_HOSTS=local:host.docker.internal:8888 \
   -p 9081:8081 \

Then if you hit in your browser you should be able to inspect Elasticache. 🐓

Connecting to cache node (AWS Docs)
Connecting to Redis Via Tunnelling
Connect to localhost from Docker