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 0.0.0.0:4567 and I'll need a public IP on this instance to manage the Redis cluster.
Any sugggestions?
You may want to give a try to Redsmin.
If you have an EC2 instance in the same subnet as your Redis ElasticCache
Note:
172.31.5.13
and is running on port6379
.172.31.5.14
and its public IP is52.50.145.87
.Now let's do this step by step:
sudo iptables -t nat -A PREROUTING -p tcp --dport 6379 -j DNAT --to-destination 172.31.5.13:6379
don't forget to change your IPs and maybe even the port numbersudo iptables -t nat -A POSTROUTING -p tcp -d 172.31.5.13 --dport 6379 -j SNAT --to-source 172.31.5.14
sudo service iptables save
if the previous command did not work, try:
iptables-save > /etc/iptables/rules.v4
iptables-save > /etc/sysconfig/iptables
Add a rule in the security group to allow inbound request from Redsmin IP
62.210.222.165
, protocol=TCP, port=6379redis://52.50.145.87:6379
, done!If you don't have an EC2 instance in the same subnet as your Redis ElasticCache
If you simply want to connect Redsmin to an EC2 Redis
62.210.222.165
(don't forget to specify the right port, for instance6379
)I was able to find the
ElastiCache private IP
by pinging the Primary Endpoint from the EC2 shell.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.