问题描述
我能够连接到VPC中的 Redis实例来自 EC2实例。但是我想知道是否有一种方法可以连接到Amazon EC2实例外部的ElastiCache Redis节点,例如从我的 local 开发设置或其他供应商提供的VPS实例。
I'm able to connect to an ElastiCache Redis instance in a VPC from EC2 instances. But I would like to know if there is a way to connect to an ElastiCache Redis node outside of Amazon EC2 instances, such as from my local dev setup or VPS instances provided by other vendors.
当前从我的本地设置尝试时:
Currently when trying from my local set up:
redis-cli -h my-node-endpoint -p 6379
一段时间后我只会超时。
I only get a timeout after some time.
推荐答案
不,您不能不采取诸如隧道之类的技巧,虽然可以进行测试,但会扼杀使用该工具的任何真正好处
No, you can't without resorting to 'tricks' such as a tunnel, which maybe OK for testing but will kill any real benefit of using a super-fast cache with the added latency/overhead.
从此处:
编辑2018:上面的答案在撰写时是准确的,但是现在可以通过一些配置使用此页面下大约1/2的方向从外部访问redis缓存:
EDIT 2018: This answer above was accurate when written, however it is now possible with some configuation to access redis cache from outside using the directions approximately 1/2 way down this page: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/accessing-elasticache.html#access-from-outside-aws
这篇关于您可以在Amazon外部连接到AmazonElastiСacheRedis吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!