connect to redis server on AWS EC2

Jensen picture Jensen · Jan 11, 2013 · Viewed 7.6k times · Source

I am trying to connect to redis server running on EC2. I uncomment the bind line in redis conf file.

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

but I still could not 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 am able to connect the the ec2 box through ssh:

ssh -i ~/.ec2/ec2.pem [email protected]

Thanks

Answer

Mike Brant picture Mike Brant · Jan 11, 2013

You need to set the security policy associated with the instance to allow for inbound traffic on port 6379.