Cloudwatch log store costing vs S3 costing

可紊 提交于 2020-03-26 06:44:48

问题


I have an ec2 instance which is running apache application.

I have to store my apache log somewhere. For this, I have used two approaches:

  1. Cloudwatch Agent to push logs to cloudwatch
  2. CronJob to push log file to s3

I have used both of the methods. Both methods suit fine for me. But, here I am little worried about the costing.

Which of these will have minimum cost?


回答1:


S3 Pricing is basically is based upon three factors:

  1. The amount of storage.
  2. The amount of data transferred every month.
  3. The number of requests made monthly.

The cost for data transfer between S3 and AWS resources within the same region is zero.

According to Cloudwatch pricing for logs :

All log types. There is no Data Transfer IN charge for any of CloudWatch.Data Transfer OUT from CloudWatch Logs is priced.

Pricing details for Cloudwatch logs:

  • Collect (Data Ingestion) :$0.50/GB
  • Store (Archival) :$0.03/GB
  • Analyze (Logs Insights queries) :$0.005/GB of data scanned

Refer CloudWatch pricing for more details.

Similarly, according to AWS, S3 pricing differs region wise.

e.g For N.Virginia :

S3 Standard Storage

  • First 50 TB / Month :$0.023 per GB
  • Next 450 TB / Month :$0.022 per GB
  • Over 500 TB / Month :$0.021 per GB

Refer S3 pricing for more details.

Hence, we can conclude that sending logs to S3 will be more cost effective than sending them to CloudWatch.




回答2:


They both have similar storage costs, but CloudWatch Logs has an additional ingest charge.

Therefore, it would be lower cost to send straight to Amazon S3.

See: Amazon CloudWatch Pricing – Amazon Web Services (AWS)



来源:https://stackoverflow.com/questions/55472308/cloudwatch-log-store-costing-vs-s3-costing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!