从EC2连接到RDS [英] Connecting to RDS from EC2

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

问题描述

这是一个基本问题,我对AWS的经验不多(Azure是我的惯用包!)。

This is a bit of a basic question, I don't have much experience of AWS (Azure is my usual bag!).

连接到RDS时实例和使用连接字符串(例如:xxx.xxxxxx.eu-west-1.rds.amazonaws.com:1433)的EC2实例,并且RDS和EC2都在同一VPC中,该连接是否需要支付带宽费用?仅当将RDS IP地址添加到安全组时,EC2才能访问RDS。

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? The EC2 can only access the RDS when the RDS IP address is added to the security group.

此外,流量是通过Internet路由还是有某种方法可以通过某种虚拟LAN配置流量?如果可以的话,有人可以指出我的工作原理吗?

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?

此配置听起来正确吗?

谢谢你的帮助。
Carl

Thanks for your help. Carl

推荐答案


使用$ b从RDS实例和EC2实例连接时$ b连接字符串,例如:
xxx.xxxxxx.eu-west-1.rds.amazonaws.com:1433和RDS和EC2
都在同一VPC中,将为此收取带宽费用
连接?

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 USD收费。

The bandwidth charges are the same as data transfer between two EC2 instances in the same VPC. That is, there will be no charge for data transfer within the same availability zone, and will be charged $0.01 per GB for data transferred between availability zones.


仅当RDS IP地址为
添加到安全组时,EC2才能访问RDS。

The EC2 can only access the RDS when the RDS IP address is added to the security group.

您应该启用与您的EC2实例相关联的EC2安全组的入站访问,而不是EC2 IP地址。

You should enable inbound access from the EC2 security group associated with your EC2 instance, instead of the EC2 IP address.


通过互联网还是有某种方法可以通过某种虚拟局域网配置
的流量?如果可以的话,有人
会指出我的工作原理吗?

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(虚拟私有云)是您正在寻找的虚拟局域网。 VPC内实例和服务之间的所有流量都保留在VPC内。您的VPC中的通信不会发送到Internet。

The VPC (Virtual Private Cloud) is the virtual LAN you are looking for. All traffic between instances and services within your VPC stays within your VPC. Communication within your VPC does not go out to the internet.

由于您提到自己来自Azure背景,因此应尝试将Azure服务的知识映射到相应的AWS服务。我相信 Azure虚拟网络与AWS VPC基本相同。

Since you mentioned you are coming from an Azure background, you should try to map your knowledge of Azure services to the corresponding AWS services. I believe an "Azure Virtual Network" is basically the same thing as an AWS VPC.

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

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