简体   繁体   English

降低 AWS S3 文件的 AWS 数据传输成本

[英]Reducing AWS Data Transfer Cost for AWS S3 files

AWS S3 has a standard public bucket and folder ( Asia Pacific region ) which hosts ~30 GB of images/media. AWS S3 有一个标准的公共存储桶和文件夹(亚太地区),可托管约 30 GB 的图像/媒体。 On another hand, the website and app access these images by using a direct S3 object URL.另一方面,网站和应用程序通过使用直接 S3 object URL 访问这些图像。 Unknowingly we run into high data transfer cost and its significantly unproportionate:在不知不觉中,我们遇到了高昂的数据传输成本及其明显不成比例的问题:

  1. Amazon Simple Storage Service: USD 30亚马逊简单存储服务:30 美元
  2. AWS Data Transfer: USD 110 AWS 数据传输:110 美元

I have also read that if EC2 and S3 is in the same region cost will be significantly lower, but problem is S3 objects are accessible from anywhere in the world from client machine directly and no EC2 is involved in between.我还读到如果 EC2 和 S3 在同一个区域,成本会大大降低,但问题是 S3 对象可以直接从客户端机器从世界任何地方访问,并且两者之间不涉及 EC2。

Can someone please suggest how can data transfer costs be reduced?有人可以建议如何降低数据传输成本吗?

The Data Transfer charge is directly related to the amount of information that goes from AWS to the Internet .数据传输费用与从 AWS 到 Internet的信息量直接相关。 Depending on your region, it is typically charged at 9c/GB.根据您所在的地区,通常按 9c/GB 收费。

If you are concerned about the Data Transfer charge, there are a few things you could do:如果您担心数据传输费用,您可以采取以下措施:

  • ActivateAmazon S3 Server Access Logging , which will create a log file for each web request.激活Amazon S3 服务器访问日志,这将为每个 web 请求创建一个日志文件。 You can then see how many requests are coming and possibly detect strange access behaviour (eg bots, search engines, abuse).然后,您可以看到有多少请求即将到来,并可能检测到奇怪的访问行为(例如机器人、搜索引擎、滥用)。
  • You could try reducing the size of files that are typically accessed, such as making images smaller.您可以尝试减小通常访问的文件的大小,例如缩小图像。 Take a look at the Access Logs and determine which objects are being accessed the most, and are therefore causing the most costs.查看访问日志并确定哪些对象被访问最多,因此造成的成本最高。
  • Use less large files on your website (eg videos).在您的网站上使用较少的大文件(例如视频)。 Again, look at the Access Logs to determine where the data is being used.同样,查看访问日志以确定数据的使用位置。

A cost of $110 suggests about 1.2TB of data being transferred. 110 美元的成本表明正在传输大约 1.2TB 的数据。

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

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