从本地机器连接到 AWS 上的 Neptune [英] Connect to Neptune on AWS from local machine

查看:58
本文介绍了从本地机器连接到 AWS 上的 Neptune的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从办公室的本地机器连接到 AWS 实例中的 Neptune 数据库,例如从办公室连接 RDS.是否可以从本地机器连接 Neptune 数据库?.Neptune db 是否公开可用.开发者有什么方法可以从办公室连接 neptune db.

I am trying to connect to Neptune DB in AWS Instance from my local machine in office,like connecting RDS from office.Is it possible to connect Neptune db from local machine?. Is Neptune db publicly available.Is there any way developer can connect neptune db from office.

推荐答案

Neptune 不支持公共端点(可从 VPC 外部访问的端点).但是,很少有架构选项可供您在 VPC 之外访问您的 Neptune 实例.它们都具有相同的主题:设置驻留在您的 VPC 内的代理(EC2 机器或 ALB,或类似的东西,或这些的组合),并使该代理可从您的 VPC 外部访问.

Neptune does not support public endpoints (endpoints that are accessible from outside the VPC). However, there are few architectural options using which you can access your Neptune instance outside your VPC. All of them have the same theme: setup a proxy (EC2 machine, or ALB, or something similar, or a combination of these) that resides inside your VPC, and make that proxy accessible from outside your VPC.

您似乎纯粹出于开发目的想与您的实例交谈.最简单的选择是启动 ALB,并创建一个指向实例 IP 的目标组.

It seems like you want to talk to your instance purely for development purposes. The easiest option for that would be to spin up an ALB, and create a target group that points to your instance's IP.

简要步骤(这些是故意不详细的,请参阅 AWS Docs 以获取详细说明):

Brief Steps (These are intentionally not in detail, please refer to AWS Docs for detailed instructions):

  1. dig +short <你的集群端点>这将为您提供当前主站的 IP 地址.

  1. dig +short <your cluster endpoint> This would give you the current master's IP address.

创建 ALB(有关如何执行此操作的信息,请参阅 AWS 文档).

Create an ALB (See AWS Docs on how to do this).

现在,您可以从您的开发人员盒子中连接到位于 PORT-A 的 ALB 端点,该端点会在内部将请求转发到您的 Neptune 实例.

Now from your developer boxes, you can connect to your ALB endpoint at PORT-A, which would internally forward the request to your Neptune instance.

请查看 ALB 文档,了解有关如何创建它以及围绕它的概念的详细信息.如果您需要我详细说明任何步骤,请随时询问.

Do checkout ALB docs for details around how you can create it and the concepts around it. If you need me to elaborate any of the steps, feel free to ask.

注意:这不是生产设置的推荐解决方案.Neptune 实例使用的 IP 必然会随着故障转移和主机更换而改变.此解决方案仅用于测试目的.如果您想要类似的生产设置,请随时提出问题,我们可以讨论选项.

NOTE: This is not a recommended solution for a production setup. IP's used by Neptune instances are bound to change with failovers and host replacements. Use this solution only for testing purposes. If you want a similar setup for production, feel free to ask a question and we can discuss options.

这篇关于从本地机器连接到 AWS 上的 Neptune的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆