简体   繁体   English

如何从 VPN 访问 AWS ElastiCache (Redis)

[英]How to access AWS ElastiCache (Redis) from VPN

I have launched an AWS ElastiCache node on AWS VPC.我在 AWS VPC 上启动了一个 AWS ElastiCache 节点。 I can access this Redis endpoint from within the VPC resources like EC2.我可以从 VPC 资源(如 EC2)中访问此 Redis 端点。

I have a VPN connection (Virtual Private Network) from On-Premise to this VPC.我有一个从内部部署到此 VPC 的 VPN 连接(虚拟专用网络)。 I can access all other resources like EC2 but, I am unable to access the Redis Endpoint from On-Premise network.我可以访问所有其他资源,例如 EC2,但是,我无法从本地网络访问 Redis 端点。

Note: As I am able to access EC2 resources from On-Premise, routing table is set appropriately.注意:由于我能够从本地访问 EC2 资源,因此路由表已正确设置。

Could you let me know (if I have to modify anything) how to access the Redis Endpoint in VPC from On-Premise network (Without using NAT Instance) (I can use NAT Gateway if required) ??您能否让我知道(如果我必须修改任何内容)如何从本地网络(不使用 NAT 实例)访问 VPC 中的 Redis 端点(如果需要,我可以使用 NAT 网关)??

I've never been able to get Redis accessible with your setup.我一直无法通过您的设置访问 Redis。 According to AWS documentation you need to create an Ec2 instance in the VPC and use it as a jumpbox to connect to Redis.根据 AWS 文档,您需要在 VPC 中创建一个 Ec2 实例并将其用作 Jumpbox 以连接到 Redis。 I don't like that option either since I can't use the tools I have installed on my developer machine.我也不喜欢那个选项,因为我不能使用我在我的开发机器上安装的工具。

I instead (and recommend) you spin up an OpenVPN Remote Access box that is within the VPC, launched into the public subnet, so you can access the Redis cluster.相反,我(并建议)您在 VPC 内启动一个 OpenVPN 远程访问框,启动到公共子网中,以便您可以访问 Redis 集群。 Just search under community AMI's OpenVPN Access Server只需在社区 AMI 的OpenVPN 访问服务器下搜索

You can connect to ElastiCache with redis by using NAT, as described at the documentation .您可以使用 NAT 通过 redis 连接到 ElastiCache,如文档 中所述

Alternatively, if you are using simple key/value operations you might want to switch to memcached.或者,如果您使用简单的键/值操作,您可能希望切换到 memcached。 With ElastiCache for memcached you should be able to access from your datacenter , as long as you have configured a Virtual Private Gateway to the same VPC where your ElastiCache is deployed使用适用于 memcached 的 ElastiCache, 您应该能够从您的数据中心进行访问,只要您已将虚拟专用网关配置为与部署 ElastiCache 的 VPC 相同的 VPC

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM