Putharekulu
Putharekulu

Reputation: 141

How to monitor daily costs of Amazon S3

I was looking around to learn about Do and Don'ts of Amazon S3 and was looking at options on how to monitor usage daily. I have couple of questions here:

  1. I see on the Amazon S3 pricing page that PUT, COPY, POST, or LIST Requests are $0.005 per 1,000 requests

I have 5 buckets in S3 and each of these buckets have sub folders having 100k files.

If I do aws s3 ls --recursive will I be charged 5*100k=500000/1000 = 500*0.005 = $2.50?

  1. Any suggestions on tools that can be used to email daily usage rate of my S3 bucket?

Upvotes: 2

Views: 2028

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269091

A LIST request can return up to 1000 objects. Therefore, to obtain the full list of 100k objects, it would require 100 LIST requests. That would consume a tenth of the initial $0.005 charge.

If you were to repeat this for 5 buckets, it would require 500 LIST requests, which would consume of half of the initial $0.005 charge.

Alternatively you could use Amazon S3 Storage Inventory, which can provide a daily/weekly CSV file that contains a list of all your objects. It is charged at $0.0025 per million objects listed (per bucket per run).

I sense that you are worried about your Amazon S3 costs. You can configure billing alerts and notifications to remain aware of when your costs rise above expected levels. This works for all AWS services.

See:

Upvotes: 3

Related Questions