Connect to redis server on AWS EC2

I am trying to connect to a redis server running on EC2. I will uncomment the binding string in the redis conf file.

>> netstat -nlpt | grep 6379 tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN - 

but I still can’t connect to it with the following command:

 redis-cli -h ec2-xx-xx.us-west-1.compute.amazonaws.com -p 6379 

Am I missing something here? I can connect the ec2 block via ssh:

 ssh -i ~/.ec2/ec2.pem ubuntu@ec2-xx-xx.us-west-1.compute.amazonaws.com 

thanks

+4
source share
1 answer

You need to set the security policy associated with the instance in order to allow incoming traffic on port 6379.

+13
source

All Articles