- Newest
- Most votes
- Most comments
In the AWS Cost Explorer, by filtering on service: Amazon ECR and applying a group by usage type, you could get down to an hourly pricing per region for your repositories. From there, you could get a rough estimate of the total storage by using the pricing of the ECR storage for that region.
If you need something more precise, I suggest to look at the Cost and Usage Report (CUR), it will have more granular details per repositories, etc. Using Athena it's possible to build query to get the exact report you're looking for.
Here's a link to the documentation to use Amazon Athena to query CUR : https://docs.aws.amazon.com/cur/latest/userguide/cur-query-athena.html
Extending upon @MB's answer suggesting Cost and Usage Reports. I use this query to find out which repositories are using the most storage.
To make it work for you, you'll need to change the database, table, year, month, and possibly the region in the line item string.
SELECT line_item_resource_id, SUM(line_item_usage_amount) FROM "cur"."cur_report_1"
WHERE line_item_product_code = 'AmazonECR'
AND line_item_usage_type = 'APS2-TimedStorage-ByteHrs'
AND year = '2024'
AND month = '4'
GROUP BY line_item_resource_id
ORDER BY SUM(line_item_usage_amount) DESC
Relevant content
- asked 2 years ago
- asked 3 years ago
- asked 7 months ago