By using AWS re:Post, you agree to the Terms of Use

S3 Individual Bucket Charges

0

Hello, Is there an easy way to check the cost of individual S3 buckets? I have multiple S3 buckets with video content in it. I also have cloudfront that accesses the video content from those s3 buckets. So, ideally I would want to know all price for outgoing data plus price for cloudfront for each time a video is watched.

2 Answers
1

S3 bucket specific data can be available in Cost and Usage Reports (CUR) [1]. The CUR can be setup to include the Resource ID, which in the case of S3 will be the S3 Bucket. There are public labs (Level 200) that can help you learn how to query the CUR from Athena [2].

For CloudFront, there are 2 questions here. (1) How much content is being served by CloudFront. (2) How much content is being pulled from S3 as the Origin. CloudFront has logs [3] information that can tell you how much data is being served. To know who and how much is being requested from S3, you'll need to use S3 Server Access Logs [4]. Neither of these logging methods will give you any pricing information. Splitting the costs based on CloudFront requests and S3 requests will need to be analyzed.

[1] https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html

[2] https://www.wellarchitectedlabs.com/cost/200_labs/

[3] https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/logging.html

[4] https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html

profile picture
answered 8 months ago
0

You can use tags to track your costs. You'll have to create a tag for your buckets and then activate them. After you activate them, you have to wait up to 24 hours for them to be effective. Here's a document on how to use them and activate them. The cost explorer will separate the costs based on the tags then. https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html

answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions