27

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?

Andres
  • 351
  • 1
  • 4
  • 11
  • Could you post a screenshot of your security group and also of the details of the elasticache node? – Ben Whaley Mar 28 '14 at 23:12
  • Can you also confirm that the subnets in the default cache subnet group are public? e.g. they should have route traffic to 0.0.0.0/0 to the internet gateway, not to the NAT. – Ben Whaley Mar 29 '14 at 00:08

2 Answers2

43

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/

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
  • I was able to connect just from my ec2 instance which is in the same VPC of my ElastiCache, sigh. Thank you man. – Andres Apr 01 '14 at 03:20
  • 2
    NOOOOOOOOOOOOOOOO!!!!!! I hope they are considering making it available. I have a software license that forces me to host my code on a Mac and I communicate with my EC2 server with redis :( – mabounassif Aug 27 '14 at 20:07
  • 3
    @mabounassif SSH to your EC2 server and forward the relevant port of the redis server to your local. – owensmartin Nov 05 '14 at 20:45
1

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

Community
  • 1
  • 1
Kerem
  • 1,494
  • 2
  • 16
  • 27