Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not connect to Redis node on aws

I'm a newbie in some of the AWS services. I was following this documentation link:

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/GettingStarted.ConnectToCacheNode.Redis.html

And I already installed redis-cli with brew in my computer(I'm in a mac) and I'm still having the same error when trying to connect to the node:

$ redis-cli -h mynode.abcdef.0001.usw2.cache.amazonaws.com -p 6379 

Error:

Could not connect to Redis at mynode.abcdef.0001.usw2.cache.amazonaws.com:6379: Operation timed out 

Yes, I have configured the VPC Security Group to allow all inbound traffic to my Node and the problem persist.

Security Group Conf:

Security Group Configuration

Node Description:

enter image description here

Any ideas?

like image 424
Andres Avatar asked Mar 28 '14 21:03

Andres


2 Answers

You can't connect to eleasticache from outside of aws. It just the way it is setup. Would be nice to do for debugging and development, but for production it doesn't really make sense to introduce that much latency into a system that main purpose is to give as-fast-as-possible results.

From AWS FAQ:

Please note that IP-range based access control is currently not enabled for Cache Clusters. All clients to a Cache Cluster must be within the EC2 network, and authorized via security groups as described above.

http://aws.amazon.com/elasticache/faqs/

like image 165
E.J. Brennan Avatar answered Oct 16 '22 21:10

E.J. Brennan


External access to Elasticache resources is possible yet discouraged:

Elasticache is a service designed to be used internally to your VPC. External access is discouraged due to the latency of Internet traffic and security concerns. However, if external access to Elasticache is required for test or development purposes, it can be done through a VPN.

Guide: Accessing ElastiCache Resources from Outside AWS

like image 27
Kerem Avatar answered Oct 16 '22 23:10

Kerem