简体   繁体   English

AWS EC2 弹性 IP 带宽使用和费用

[英]AWS EC2 Elastic IPs bandwidth usage and charges

I have a little questions regarding Elastic IPs and its charge.我对弹性 IP 及其费用有一些疑问。 Some blogs says that Elastic IP will charge you by the bandwidth you use有博客说Elastic IP会按你使用的带宽收费

Elastic IP addresses charge by bandwidth and have an hourly price when they are not attached to a running instance Elastic IP 地址按带宽收费,在未附加到正在运行的实例时按小时收费

From http://things.zarate.org/scaling-a-single-ec2-instance-and-downsizing来自http://things.zarate.org/scaling-a-single-ec2-instance-and-downsizing

From my understanding after reading some blogs and the documentation, you will only be charged if you use the elastic IPs in communicating between instances and if you have elastic IPs standing there idle on your account without being associated to your instance根据我阅读一些博客和文档后的理解,如果您在实例之间通信时使用弹性 IP,并且如果您的账户上有弹性 IP 闲置而未与您的实例相关联,您将只需要付费

If you communicate between instances using public or elastic IP address even in the same region you pay regional data transfer rates(0.01$ per GB in/out).如果您使用公共或弹性 IP 地址在实例之间进行通信,即使在同一地区,您也需要支付区域数据传输费率(每 GB 输入/输出 0.01 美元)。

From http://www.cloudiquity.com/2009/02/using-amazon-ec2-public-ip-address-inside-ec2.network/来自http://www.cloudiquity.com/2009/02/using-amazon-ec2-public-ip-address-inside-ec2.network/

See AWS calculator screenshot -> http://shareimage.org/images/lzjj3eull2ux0lo663fr.png请参阅 AWS 计算器屏幕截图 -> http://shareimage.org/images/lzjj3eull2ux0lo663fr.png

So my confusion is on the part whether AWS charge for any kinds of traffic requests (using my browser, SSH) using the elastic IPs?所以我的困惑在于 AWS 是否对使用弹性 IP 的任何类型的流量请求(使用我的浏览器、SSH)收费?

So if for example: I ssh-ed to my instances using the elastic IPs (For example 8.8.8.8) instead of the public dns name given like ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com, will this bandwidth registered as simple bandwidth in/out usage or the public/elastic IP bandwidth?因此,例如:我使用弹性 IP(例如 8.8.8.8)而不是像 ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com 这样的公共 dns 名称 ssh-ed 到我的实例,将此带宽注册为简单带宽输入/输出使用或公共/弹性 IP 带宽?

Thanks谢谢

You should decouple the data transfer charge question from the Elastic IP address charge one, insofar they are completely independent from each other:您应该将数据传输费用问题与 Elastic IP 地址费用分开,因为它们彼此完全独立:

Elastic IP addresses弹性 IP 地址

Allocating and using one Elastic IP addresses per instance is basically free, except if the Elastic IP address is not currently associated with an instance, see section Elastic IP Addresses on page Amazon EC2 Pricing :为每个实例分配和使用一个Elastic IP 地址基本上是免费的,除非Elastic IP 地址当前未与实例关联,请参阅Amazon EC2 定价页面上的Elastic IP 地址部分:

  • $0.00 for one Elastic IP address associated with a running instance与正在运行的实例关联的一个弹性 IP 地址 0.00 美元
  • $0.005 per additional Elastic IP address associated with a running instance per hour on a pro rata basis每个与正在运行的实例关联的额外 Elastic IP 地址按比例每小时收取 0.005 美元
  • $0.005 per Elastic IP address not associated with a running instance per hour on a pro rata basis每个与正在运行的实例无关的 Elastic IP 地址按比例每小时收取 0.005 美元
  • $0.00 per Elastic IP address remap for the first 100 remaps per month每月前 100 次重新映射每个 Elastic IP 地址重新映射 $0.00
  • $0.10 per Elastic IP address remap for additional remaps over 100 per month每个 Elastic IP 地址重新映射 0.10 美元,每月额外重新映射超过 100 个

    [emphasis mine] [强调我的]

The rationale behind this approach is explained in the respective FAQ Why am I charged when my Elastic IP address is not associated with an instance?此方法背后的基本原理在相应的常见问题解答中进行了解释为什么当我的 Elastic IP 地址未与实例关联时我会被收费? : :

In order to help ensure our customers are efficiently using the Elastic IP addresses, we impose a small hourly charge for each address when it is not associated to a running instance.为了帮助确保我们的客户有效地使用 Elastic IP 地址,我们对未与正在运行的实例关联的每个地址收取小额小时费用。

Data Transfer数据传输

Again, the key aspect is explained in section Data Transfer on page Amazon EC2 Pricing (and detailed by some FAQs):同样,关键方面在Amazon EC2 定价页面上的数据传输部分进行了解释(并通过一些常见问题解答进行了详细说明):

You primarily pay for Inte.net Data Transfer , ie data transferred "in" and "out" of Amazon EC2 , which specifically excludes the following:您主要为Inte.net 数据传输付费,即从 Amazon EC2“传入”和“传出”的数据,具体不包括以下内容:

There is no Data Transfer charge between Amazon EC2 and other Amazon Web Services within the same region (ie between Amazon EC2 US West and Amazon S3 in US West). Amazon EC2 与同一地区内其他 Amazon Web 服务之间(即美国西部的 Amazon EC2 和美国西部的 Amazon S3 之间)不收取数据传输费用。 Data transferred between Amazon EC2 instances located in different Availability Zones in the same Region will be charged Regional Data Transfer.位于同一区域不同可用区的 Amazon EC2 实例之间传输的数据将按区域数据传输收费。 Data transferred between AWS services in different regions will be charged as Inte.net Data Transfer on both sides of the transfer.在不同区域的 AWS 服务之间传输的数据将在传输双方收取 Inte.net Data Transfer 费用。

Caveat警告

The important caveat to be aware of indeed follows below that statement though:不过,该声明下方确实需要注意的重要警告:

Public and Elastic IP and Elastic Load Balancing Data Transfer公共和弹性 IP 和 Elastic Load Balancing 数据传输

  • $0.01 per GB in/out – If you choose to communicate using your Public or Elastic IP address or Elastic Load Balancer inside of the Amazon EC2.network, you'll pay Regional Data Transfer rates even if the instances are in the same Availability Zone.每 GB 输入/输出 0.01 美元 – 如果您选择使用公共或弹性 IP 地址或 Amazon EC2.network 内的弹性负载均衡器进行通信,即使实例位于同一可用区,您也将支付区域数据传输费率。 For data transfer within the same Availability Zone, you can easily avoid this charge (and get better.network performance) by using your private IP whenever possible.对于同一可用区内的数据传输,您可以尽可能使用您的私人 IP 轻松避免此费用(并获得更好的网络性能)。

Remedy补救

Not mentioned in the aforementioned paragraph is an important and quite helpful feature of the AWS DNS infrastructure though, see Public IP Addresses and External DNS Hostnames :上述段落中未提及的是 AWS DNS 基础设施的一项重要且非常有用的功能,请参阅公共 IP 地址和外部 DNS 主机名

We provide each instance that has a public IP address with an external DNS hostname.我们为每个具有公共 IP 地址和外部 DNS 主机名的实例提供。 We resolve an external DNS hostname to the public IP address of the instance outside the.network of the instance, and to the private IP address of the instance from within the.network of the instance.我们将外部 DNS 主机名解析为实例的 .network 之外的实例的公共 IP 地址,以及实例的 .network 内的实例的私有 IP 地址。

That is, it's resolving the public DNS (eg ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com ) to the Private IP address when you are using it inside the Amazon EC2.network, and to the Public or Elastic IP address when using it outside the Amazon EC2.network.也就是说,当您在 Amazon EC2.network 中使用它时,它将公共 DNS(例如ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com )解析为私有地址IP,以及公共或在 Amazon EC2.network 之外使用时弹性 IP 地址 Like so you get the free Availability Zone Data Transfer and reduced charge Regional Data Transfer automatically, eg they are actively applying their advise to Always use the internal address when you are communicating between Amazon EC2 instances [which] ensures that your.network traffic follows the highest bandwidth, lowest cost, and lowest latency path through our.network.这样您就可以自动获得免费的可用区数据传输和降低费用的区域数据传输,例如,当您在 Amazon EC2 实例之间进行通信时,他们正在积极应用他们的建议始终使用内部地址[这]确保您的网络流量遵循通过 our.network 的最高带宽、最低成本和最低延迟路径。

This obviously doesn't work, if you are using the IP addresses directly (ie without DNS), which is thus usually best avoided for this and other reasons in the context of EC2.如果您直接使用 IP 地址(即没有 DNS),这显然是行不通的,因此在 EC2 的上下文中通常最好避免使用 IP 地址。

When does an Elastic IP incur charges? Elastic IP 什么时候产生费用?

If you have created an elastic IP and it is not associated with any virtual machine If you have created an elastic IP, and also have associated it with a Virtual Machine but the Virtual Machine is not running You have multiple Elastic IPs associated with a single EC2 instance如果您创建了弹性 IP 并且它未与任何虚拟机关联 如果您创建了弹性 IP 并且还已将其与虚拟机关联但虚拟机未运行 您有多个弹性 IP 与单个 EC2 关联实例

Checkout this link which has more relevant info around the same: https://tech-blog-yo.com/devops/aws-amozon-web-services/what-is-an-elastic-ip-in-aws-why-do-we-need-it-when-it-incurs-charges-in-billing查看此链接,其中包含更多相关信息: https://tech-blog-yo.com/devops/aws-amozon-web-services/what-is-an-elastic-ip-in-aws-why-当它产生费用时我们需要它吗

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

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