# Cost Explorer In AWS

  1. The easy-to-use interface of AWS Cost Explorer helps you to monitor, understand, and track your AWS costs and consumption over time.
  2. The AWS Cost Explorer API enables you to directly access the AWS Cost Explorer driven interactive, ad-hoc query engine. A cost of $0.01 will be incurred for each request.
  3. The granularity of the Cost Explorer Hourly and Resource level allows you to view the last 14 days of hourly granularity and resource level granularity for EC2 instances. The cost is $0.01 per 1,000 UsageRecords month.
  4. Let's consider the case, user has 50 instances (all regions) in his account. If you want to fetch the cost & usage for each EC2 resource, it will cost the user $0.01. If any other user does the same, then it will cost again $0.01.
  5. If you are checking this cost daily then it will cost a lot just for viewing the price user has spent on AWS. If you don't want to spend the cost on viewing the data repeatedly as in the case we fetch the data and use a cache mechanism. So the user doesn't have to spend the cost to view the data which was seen before.

# Enabling Access To Cost Explorer

By default this dashboard is disabled. Any user who wishes to see this dashboard needs to enable it from the master account.

  1. Go to AWS Management Console and sign in with master account.
  2. In the right corner, you will see the master account name. Click on the name and in the dropdown options select My Billing Dashboard.


  1. In the left panel, click on the Cost Explorer.


  1. On the Cost Explorer page, choose Launch Cost Explorer.
  2. In the left panel, choose Preferences.
  3. On the Preferences page, select or clear the Linked Account Access checkbox.
  4. Choose Save.
  5. After you enable Cost Explorer at the master account level, you can use IAM to manage access to your billing data for individual IAM users. This enables you to grant or revoke access on an individual level for each account, rather than granting access to all member accounts.
  6. An IAM user must be granted explicit permission to view pages in the Billing and Cost Management console.


  1. Don't forget to enable access for EC2 instance (getCostAndUsageWithResource API). This has to be done from the master account (Organization’s payer account).


# Access For Cost Explorer API

  1. To get better visibility about AWS infrastructure spending through our OptimoAnalytics(opens new window) dashboard, it is recommended to grant us access to Cost Explorer API.
  2. We need access for the below API: 1. ce get-cost-and-usage 2. ce get-cost-and-usage-with-resources
  3. In the case of EC2 instances/resources, CloutOptimo shows EC2 instance's cost(opens new window) and CPU utilization. Which will help the user to identify whether the user is spending cost on the resource which has very low CPU utilization.
  4. CloudOptimo make a call once in a day for daily data collection and once in a month for monthly usage. We store this data and users will be able to view this data without any cost incurred.

# Which cost metric do we use?

  1. In the OptimoAnalytics dashboard, we represent data in graphical as well as tabular format.

  2. AWS provides different types of cost as per resource type e.g on-demand, reserved, spot.

  3. The cost types are :

    1. Unblended costs
    2. Amortized costs
    3. Blended costs
    4. Net unblended costs
    5. Net amortized costs
  4. If you only have one account or you do not have a consolidated billing setup or you do not use reserved instance then the blended costs are the same as the unblended costs and are the simple usage costs.

  5. Unless you're a customer who has bought Savings Plans or Reservations, then the actually true dataset for evaluating the expense patterns is amortised costs.

  6. Unblended costs are the sum of the applicable rates times the usage for each AWS resource and represent the common understanding of incurred cost.

  7. Currently in OptimoAnalytics dashboard every cost is unblended cost.

  8. CloudOptimo shows EC2 instance cost, usage, and CPU utilization where the user will be able to make quick decisions whether to upscale or downscale at a single glance.

  9. We also show cost representation along with different services, purchase option, and usage.

# Unsupported Regions

CloudOptimo does not support the below regions. The resource in below-mentioned regions won't be considered for either CloudOptimo product.

  1. Asia Pacific (Hong Kong): ap-east-1
  2. Africa (Cape Town): af-south-1
  3. Middle East (Bahrain): me-south-1
  4. China (Beijing): cn-north-1
  5. AWS GovCloud (US): us-gov-west-1
  6. AWS GovCloud (US-East): us-gov-east-1

# Enable/Disable Regions

  1. Go to AWS Management Console and sign in with master account.
  2. In the right corner, you will see the master account name. Click on the name and in the dropdown options select My Account.


  1. Scroll to AWS Regions.
  2. Identify the region which you want to enable and click on the Actions column Enable link.
  3. It will open a dialog box. Click on Enable region .


Follow the same procedure for other regions. To disable the region, the Actions column will have Disable link.

# References