AWS RDS公共访问

编程入门 行业动态 更新时间:2024-10-25 04:22:02
本文介绍了AWS RDS公共访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对AWS配置感到困惑.我的目标是创建一个可从网络内部和外部访问的数据库.

I am stumped with AWS configuration. My goal is to create a database that's accessible from inside and outside the network.

这就是我所拥有的.RDS实例运行postgresql.从VPC内部进行的连接可以正常工作.

Here is what I have. RDS instance runs postgresql. Connections from inside the VPC work correctly.

将端点设置为可公开访问-并且从外部访问时,确实可以解析.但是,连接挂起,表明流量被某人阻止.

The endpoint is set up to be publicly accessible - and when accessed from the outside, does in fact resolve. However, the connection hangs, indicating the traffic is blocked by somebody.

安全组很好:入站:端口5432从0.0.0.0/0开始出站:全部从0.0.0.0/0

Security group is good: Inbound: Port 5432 from 0.0.0.0/0 Outbound: all from 0.0.0.0/0

子网.我认为那是哪里出了问题,对不对?最初,我在子网组中有两个专用子网和两个公用子网.为简化起见,我在不更改结果的情况下删除了私有的.

Subnets. I assume that's where something is wrong, right? At first I had two private and two public subnets in the subnet group. To simplify, I removed the private ones without changing the outcome.

因此,我们有两个公共子网:

So we have two public subnets:

两者都与Internet网关具有相同的路由表

Both have the same route table with an Internet Gateway

据我所知,一切都在正常进行中...那么谁在阻止我的数据库连接?

As far as I can tell, everything is in working order... So who is blocking my database connection?

推荐答案

要检查的两件事:

  • 确保RDS实例具有公开访问的属性集,以便为它分配一个公共地址

  • Ensure that the RDS instance has the publicly accessible attribute set so that it is assigned a public address

    还根据AWS RDS文档,如果要公开访问VPC中的数据库实例,则必须启用VPC属性DNS主机名和DNS解析.

    Also according to the AWS RDS docs, "If you want your DB instance in the VPC to be publicly accessible, you must enable the VPC attributes DNS hostnames and DNS resolution."

    还要检查您的RDS实例主机名解析为的IP是公共IP地址.

    Also, check that the IP that your RDS instance hostname resolves to is a public IP address.

  • 更多推荐

    AWS RDS公共访问

    本文发布于:2023-11-16 04:39:13,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1601062.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:AWS   RDS

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!