简体   繁体   English

通过AWS VPC对等连接访问heroku私有空间数据库

[英]Accessing heroku private space database over AWS VPC peering connection

I've successfully setup VPC peering from my AWS VPC to my heroku private space, and configured the routing from the VPC for the heroku private space CIDR.我已经成功地设置了从我的 AWS VPC 到我的 heroku 私有空间的 VPC 对等连接,并为 heroku 私有空间 CIDR 配置了来自 VPC 的路由。 However I'm now a bit stuck trying to connect to the private space postgres database.但是,我现在有点无法尝试连接到私有空间 postgres 数据库。

I think what I need, is to find the private IP address for the heroku postgres database.我想我需要的是找到 heroku postgres 数据库的私有 IP 地址。

Does anyone know how this is done?有谁知道这是怎么做到的? The only address I can find is the public IP address, which won't work because it would be routed over the inte.net, rather than the peering connection.我能找到的唯一地址是公共地址 IP,该地址不起作用,因为它将通过 inte.net 进行路由,而不是通过对等连接。

The peering documentation states:对等文档指出:

You cannot connect directly to data services such as Postgres, Kafka or Redis in the private space from the peered VPC.您不能从对等VPC 直接连接到私有空间中的Postgres、Kafka 或Redis 等数据服务。

So it is not possible to do what you are trying to do.所以不可能做你想做的事。 You can instead try using a PrivateLink to connect to a Heroku postgres instance from your AWS VPC.您可以尝试使用 PrivateLink 从您的 AWS VPC 连接到 Heroku postgres 实例。 More details here: https://devcenter.heroku.com/articles/heroku-postgres-via-privatelink更多细节在这里: https://devcenter.heroku.com/articles/heroku-postgres-via-privatelink

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

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