Skip to content

How do I find the cost of my Amazon S3 buckets?

4 minute read
2

I want to know the cost of each Amazon Simple Storage Service (Amazon S3) bucket in my AWS account or in an AWS Region. Or, my Amazon S3 storage costs increased for a specific Region, and I want to identify the bucket that's driving the increased cost.

Short description

To identify the Amazon S3 bucket that's increasing your storage cost, complete the following steps:

  1. Add a common tag to each bucket.
  2. Activate the tag as a cost allocation tag.
    Note: Tags can take up to 24 hours to appear in the AWS Billing and Cost Management console.
  3. Use AWS Cost Explorer to create an AWS Cost and Usage Report (CUR) for your tag.

Note: Cost allocation tags don't show you costs that you incurred before you set up the tags.

Resolution

Before you begin, make sure that your AWS Identity and Access Management (IAM) policy has permissions to do the following actions:

Note: Use an IAM user or role with the required permissions, don't use your account root user.

Add a common tag to each bucket

Complete the following steps:

  1. Open the Amazon S3 console.
  2. From the list of buckets, select the bucket that you want to track costs for.
  3. Choose the Properties tab.
  4. In the Tags section, choose Edit.
  5. Choose Add Tag.
  6. For Key, enter a name for the tag. For example, enter S3-Bucket-Name.
  7. For Value, enter the name of the bucket.
  8. Repeat steps 1-7 for each bucket that you want to track costs for.

Activate the tag as a cost allocation tag

Complete the following steps:

  1. Open the Billing and Cost Management console.
  2. In the navigation pane, under Cost Organization, choose Cost Allocation Tags.
  3. In the search bar, enter the name of your tag.
  4. Select the tag.
  5. Choose Activate.

Use Cost Explorer to create a cost report for the tag

Complete the following steps:

  1. Open the Billing and Cost Management console.
  2. In the navigation pane, under Cost and Usage Analysis, choose Cost Explorer.
  3. Choose Launch Cost Explorer.
  4. In the navigation pane, choose Reports.
  5. Choose New report.
  6. For Report Templates, select Cost & Usage report, and then choose Create Report.
  7. Under Filters, for Service, select S3 (Simple Storage Service). Then, choose Apply filters.
  8. For Tag, select the tag that you created. Then, check each bucket that you want to track costs for, and choose Apply filters.
    Note: If you recently created the tag and applied it to a bucket, then you might not see your tag in the filter list. Wait 24 hours, and then create the report again.
  9. Under Advanced options, confirm that Show only untagged resources is unchecked.
  10. From the top of the graph, choose Group by, and then select the tag that you created.
  11. Choose Save as.
  12. Enter a title for your cost report.
  13. Choose Save Report.

After you create the cost report, use the report to review the cost of each bucket that you marked with your cost allocation tag.

Note: You can set up an hourly, daily, or monthly CUR to get more Amazon S3 billing details. However, these reports don't show who made requests to your buckets. To see where requests to your bucket come from, turn on either object-level logging or server access logging. To get more information on certain Amazon S3 billing items, you must turn on logging before the billing event.

Related information

Billing and usage reporting for Amazon S3

Using the monthly cost allocation report