从 EC2 连接到 RDS
Connecting to RDS from EC2
这是一个有点基础的问题,我对AWS的经验不多(Azure是我的常用包!)。
当使用连接字符串从 EC2 实例连接到 RDS 实例时,例如:xxx.xxxxxx.eu-west-1.rds.amazonaws.com:1433 并且 RDS 和 EC2 都在同一个 VPC 中该连接的带宽费用?只有将RDS IP地址加入安全组后,EC2才能访问RDS。
此外,流量是通过 Internet 路由还是有某种方法可以通过某种虚拟 LAN 配置流量?如果可以,有人可以指出我的工作原理吗?
这个配置听起来正确吗?
感谢您的帮助。
卡尔
您可以在您的RDS安全组中给您的ec2实例ip地址权限。
你用的是哪个数据库?
如果您使用的是 mysql 然后从服务器终端 ping:
mysql -h<<hostname>> -u<<username>> -p<<password>>
When connecting to an RDS instance from and EC2 instance using
connection string such as :
xxx.xxxxxx.eu-west-1.rds.amazonaws.com:1433 and both the RDS and EC2
are in the same VPC will there be bandwidth charges for that
connection?
带宽费用与同一 VPC 中两个 EC2 实例之间的数据传输费用相同。即同可用区内传输数据不收费,可用区间传输数据每GB收费0.01美元。
The EC2 can only access the RDS when the RDS IP address is
added to the security group.
您应该启用来自与您的 EC2 实例关联的 EC2 安全组的入站访问,而不是 EC2 IP 地址。
Also, is the traffic routed over the internet or is there some way to
configure traffic over some sort of virtual LAN? If so could someone
point me in the direction of how that works?
VPC(Virtual Private Cloud)就是您要找的虚拟局域网。 VPC 内实例和服务之间的所有流量都保留在您的 VPC 内。您的 VPC 内的通信不会传到 Internet。
既然你提到你有 Azure 背景,你应该尝试将你对 Azure 服务的知识映射到相应的 AWS 服务。我相信 "Azure Virtual Network" 与 AWS VPC 基本相同。
这是一个有点基础的问题,我对AWS的经验不多(Azure是我的常用包!)。
当使用连接字符串从 EC2 实例连接到 RDS 实例时,例如:xxx.xxxxxx.eu-west-1.rds.amazonaws.com:1433 并且 RDS 和 EC2 都在同一个 VPC 中该连接的带宽费用?只有将RDS IP地址加入安全组后,EC2才能访问RDS。
此外,流量是通过 Internet 路由还是有某种方法可以通过某种虚拟 LAN 配置流量?如果可以,有人可以指出我的工作原理吗?
这个配置听起来正确吗?
感谢您的帮助。 卡尔
您可以在您的RDS安全组中给您的ec2实例ip地址权限。
你用的是哪个数据库? 如果您使用的是 mysql 然后从服务器终端 ping:
mysql -h<<hostname>> -u<<username>> -p<<password>>
When connecting to an RDS instance from and EC2 instance using connection string such as : xxx.xxxxxx.eu-west-1.rds.amazonaws.com:1433 and both the RDS and EC2 are in the same VPC will there be bandwidth charges for that connection?
带宽费用与同一 VPC 中两个 EC2 实例之间的数据传输费用相同。即同可用区内传输数据不收费,可用区间传输数据每GB收费0.01美元。
The EC2 can only access the RDS when the RDS IP address is added to the security group.
您应该启用来自与您的 EC2 实例关联的 EC2 安全组的入站访问,而不是 EC2 IP 地址。
Also, is the traffic routed over the internet or is there some way to configure traffic over some sort of virtual LAN? If so could someone point me in the direction of how that works?
VPC(Virtual Private Cloud)就是您要找的虚拟局域网。 VPC 内实例和服务之间的所有流量都保留在您的 VPC 内。您的 VPC 内的通信不会传到 Internet。
既然你提到你有 Azure 背景,你应该尝试将你对 Azure 服务的知识映射到相应的 AWS 服务。我相信 "Azure Virtual Network" 与 AWS VPC 基本相同。