Costs per EC2 instance

1

Hello. Is anyone able to guide me how to generate a report or do a graph in Costs Explorer to see how much each single EC2 costs (monthly or daily cost? I know how to do it to see how much e.g. all m5.2xlarge cost but need to know what is the cost for each single one. Thank you.

asked 4 months ago228 views
3 Answers
1
Accepted Answer

Hello Micbak01,

When using Cost Explorer, you would need to apply the correct filters and dimensions and you will be able to see a graph showing the cost of instance types, or even a single instance in any particular AWS account.

How much all m5.2xlarge are costing you:

  1. Visit AWS Cost Management --> Cost Explorer
  2. On the filter side. Granularity: Monthly, Dimension: Instance Type, Instance Type (Select your desired instance type).

How much a specific account is spending on any particular instance type:

  1. Visit AWS Cost Management --> Cost Explorer
  2. ON the filter side. Granularity: Monthly, Dimension: Linked Account, LInked Account (type in your desired account), Instance type (select your desired instance)

How much a specific instance is costing you:

  1. Visit AWS Cost Management --> Cost Explorer
  2. On the filter side: Dimension: Service, Service: EC2-Instances (Elastic Compute Cloud), EC2-instances (Enter the instance ID you would like to review the cost for)

Attached are some screenshots to help you visualize.

I highly recommend that you save your desired reports for future usage. Also, use Cost Allocation Tags to simplify this type of reporting where you can filter by application, by team, by BU, etc.

https://docs.aws.amazon.com/cost-management/latest/userguide/ce-default-reports.html

Enter image description here Enter image description here Enter image description here

profile pictureAWS
answered 4 months ago
profile pictureAWS
EXPERT
reviewed 4 months ago
  • Hello Carloslijeron. Thank you for your answer and guide. All looks good and I tried those options actually but somehow I cannot see "EC2-Instance" filter that you have here between Resource and Cost Category. Maybe it's related to permissions or something else.

  • @Micbak01, the Cost Explorer filters are dynamic and they change based on certain options you select. There is usually more than one way to get to the same result; with this in mind, ensure you clear all filters or load a new page of Cost Explorer.

    Ensure to set the dimension as "Service" This will allow you to see the filters related to Service. Under service, ensure to select EC2-Instances (Elastic Compute Cloud - Compute). At this point the report will only focus on the EC2 services. Now you should be able to see the EC2-Instances after resource where you can type the instance ID. Based on your absolute timeframe value, the graph will show how much that instance has cost you.

    I hope this helps. Cost Explorer is very powerful.

0

What are AWS Cost and Usage Reports?

The AWS Cost and Usage Reports (AWS CUR) contains the most comprehensive set of cost and usage data available. You can use Cost and Usage Reports to publish your AWS billing reports to an Amazon Simple Storage Service (Amazon S3) bucket that you own. You can receive reports that break down your costs by the hour, day, or month, by product or product resource, or by tags that you define yourself. AWS updates the report in your bucket once a day in comma-separated value (CSV) format. You can view the reports using spreadsheet software such as Microsoft Excel or Apache OpenOffice Calc, or access them from an application using the Amazon S3 API.

AWS Cost and Usage Reports tracks your AWS usage and provides estimated charges associated with your account. Each report contains line items for each unique combination of AWS products, usage type, and operation that you use in your AWS account. You can customize the AWS Cost and Usage Reports to aggregate the information either by the hour, day, or month.

AWS Cost and Usage Reports can do the following:

Deliver report files to your Amazon S3 bucket Update the report up to three times a day Create, retrieve, and delete your reports using the AWS CUR API Reference

How Cost and Usage Reports work

After you create a Cost and Usage Report, AWS sends your report to the Amazon S3 bucket that you specify. AWS updates your report at least once a day until your charges are finalized.

Your report files consist of a .csv file or a collection of .csv files and a manifest file. You can choose to configure your report data for integration with Amazon Athena, Amazon Redshift, or Amazon QuickSight.

AWS
answered 4 months ago
0

Guidance

In Cost Explorer, navigate to Report Parameters and select the below –

Date Range = Monthly / Daily

Granularity = Monthly / Hourly / Daily

Dimension = Resource

Instance Type = m5.2xlarge

Post this you can search for a specific EC2 instance in the “Find cost and usage data” search bar located just below the graphs. Alternatively you can also use Cost and Usage Reports.

Exploring more data for advanced cost analysis

Cost Explorer provides AWS cost and usage data for the current month and up to the previous 13 months at daily and monthly granularity. You can query this data in the console or using the Cost Explorer API. You can enable multi-year data (at monthly granularity) and more granular data (at hourly and daily granularity) for the previous 14 days. Once enabled, you can use this data in the console or using the Cost Explorer API.

AWS
answered 4 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