我们正在使用ElastiCache – Redis作为我们的网站,我们需要刷新Rediscaching,当我尝试从任何PC通过此命令远程连接到我的ElastiCache – Redis时
redis-cli -h example-redis-1.example.0001.euw1.cache.amazonaws.com -p 6379
它总是说:
无法连接到Redis example-redis-1.example.0001.euw1.cache.amazonaws.com:6379:连接拒绝未连接>
我已经确保入站规则允许从任何IP 6379,也试图编辑/etc/redis.conf添加绑定example-redis-1.example.0001.euw1.cache.amazonaws.com但即使比错误仍然是相同。
ElastiCache群集只能从它所在的VPC中直接访问。 这是因为ElastiCache不是一个安全的服务。
为了远程连接您的ElastiCache,您需要通过堡垒服务器或NAT。 AWS在这里创build了说明:
http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Access.Outside.html
要使用堡垒,你需要SSH进入驻留在VPC中的堡垒EC2实例。 一旦连接,您就可以通过PC连接ElastiCache连接,也可以从堡垒的命令提示符连接到caching。