I've a AWS ElastiCache Redis cluster setup that I wish to manage. Since AWS doesn't let you access ElastiCache outside the VPC, I've setup a micro EC2 instance that carried a copy of the phpRedisAdmin script pointed to this cluster. But AWS has disabled the 'CONFIG' command on the Redis cluster so phpRedisAdmin can't connect and manage the ElastiCache cluster.

I've tried the redis-browser node package but it runs on and I'll need a public IP on this instance to manage the Redis cluster.

Any sugggestions?

3 Answers 3


You may want to give a try to Redsmin.

If you have an EC2 instance in the same subnet as your Redis ElasticCache


  • This will only work if the EC2 instance you connect to is in the same subnet as your ElasticCache Redis instance.
  • The following example will state that your ElastiCache private IP is and is running on port 6379.
  • The following example will state that your EC2 private IP is and its public IP is

Now let's do this step by step:

  • Connect to this EC2 instance through SSH
  • run sudo iptables -t nat -A PREROUTING -p tcp --dport 6379 -j DNAT --to-destination don't forget to change your IPs and maybe even the port number
  • run sudo iptables -t nat -A POSTROUTING -p tcp -d --dport 6379 -j SNAT --to-source
  • run sudo service iptables save
  • if the previous command did not work, try:

    • on Debian/Ubuntu => iptables-save > /etc/iptables/rules.v4
    • on RHEL/CentOS => iptables-save > /etc/sysconfig/iptables
  • Add a rule in the security group to allow inbound request from Redsmin IP, protocol=TCP, port=6379

  • Add a new Direct Server in redsmin with the connection string: redis://, done!

If you don't have an EC2 instance in the same subnet as your Redis ElasticCache

  • Follow this amazon tutorial to setup a NAT instance, setup it on the same subnet as your ElastiCache server.
  • Now follow the previous section above.

If you simply want to connect Redsmin to an EC2 Redis

  • Add a rule in the security group to allow inbound request from Redsmin IP (don't forget to specify the right port, for instance 6379)
  • Connect your Redis server in Redsmin using the EC2 public IP and the port you opened.
  • the link to setup a nat instance doesn't say anything on setting up a nat instance, do you have any other link/info related to this?
    – lele
    Aug 24, 2021 at 18:49

I was able to find the ElastiCache private IP by pinging the Primary Endpoint from the EC2 shell.

PING xyz.abc.euw2.cache.amazonaws.com (172.31.xxx.xxx) 56(84) bytes of data.

I know this is an old post, but it came up in my search and the accepted method did not work for me.

I am posting what worked for me in case someone else will need it:

I used MobaXTerm Tunnels function to connect to EC2 Amazon Linux instance using local port 6379. The Tunnels dialog is very user-friendly and easy to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.