amazon-ec2 - Amazon RDS 终端节点内部

标签 amazon-ec2 rds

如何通过内部 ip 地址或 dns 使 ec2 实例与 aws 上的 rds 实例通信?
我只看到像 xxx.cehmrvc73g1g.eu-west-1.rds.amazonaws.com:3306 这样的公共(public) dns
内部 ipaddress 会比公共(public) dns 更快吗?

谢谢

最佳答案

后人注意,确保您在 VPC 对等链接上启用 DNS!
enter image description here

Enabling DNS Resolution Support for a VPC Peering Connection

To enable a VPC to resolve public IPv4 DNS hostnames to private IPv4 addresses when queried from instances in the peer VPC, you must modify the peering connection.

Both VPCs must be enabled for DNS hostnames and DNS resolution.

To enable DNS resolution support for the peering connection

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Peering Connections.

  3. Select the VPC peering connection, and choose Actions, Edit DNS Settings.

  4. To ensure that queries from the peer VPC resolve to private IP addresses in your local VPC, choose the option to enable DNS resolution for queries from the peer VPC.

  5. If the peer VPC is in the same AWS account, you can choose the option to enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peer VPC is in a different AWS account.

  6. Choose Save.

  7. If the peer VPC is in a different AWS account, the owner of the peer VPC must sign into the VPC console, perform steps 2 through 4, and choose Save.

关于amazon-ec2 - Amazon RDS 终端节点内部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21089582/

相关文章:

amazon-web-services - 启用计数时创建 Terraform 输出

java - 如何在 Scala/Java 中测量从虚拟机中窃取的时间?

linux - 启用 VNC 的 Amazon EC2 镜像?

bash - aws cli - 在 bash 脚本中下载 rds postgres 日志

postgresql - RDS Postgres 更改 SQL log_statement 值

python - 在 AWS rds 中很难找到区域名称

PostgreSQL - 限制用户仅连接到副本(而不是主节点)

java - Elastic Beanstalk .ebextensions 在 WAR 中被忽略

json - EC2 json模板bash脚本未执行全部内容

amazon-web-services - 一个 VPC 中的数据库实例被不同 VPC 中的 EC2 实例访问