Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

433
Views
How to enable hourly granularity for cost and usage data in AWS?

I am trying to call get-cost-and-usage api of AWS to generate hourly report. But, i am getting an error around enabling an opt-in only feature.

aws ce get-cost-and-usage --time-period '{"Start": "2020-06-10T00:00:00Z", "End": "2020-06-15T00:00:00Z"}' --granularity 'HOURLY' --metrics "AmortizedCost" "BlendedCost" "NetAmortizedCost" "NetUnblendedCost" "NormalizedUsageAmount" "UnblendedCost" "UsageQuantity" --group-by Type=DIMENSION,Key=SERVICE

Error Message:

An error occurred (AccessDeniedException) when calling the GetCostAndUsage operation: Hourly data granularity is an opt-in only feature. You can be enable this feature from the PAYER account’s Cost Explorer Settings page.

I don't see any settings page to enable this feature. Is there any way to enable this feature, via console or cli?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

It is mentioned in many documentation links about.

Hourly data granularity is an opt-in only feature.

And when we execute the CE API, it also throws the error.

An error occurred (AccessDeniedException) when calling the GetCostAndUsage operation: Hourly data granularity is an opt-in only feature. You can be enable this feature from the PAYER account’s Cost Explorer Settings page.

But no screenshot or detailed information is provided any where. I am attaching the screenshot, How to enable "Hourly and Resource Level Data" e.g opt-in for Hourly data granularity.

I am using consolidated Billing account, so this setting is needed in main Payer's account.

enter image description here

Few things more to consider about this settings:

Allow all accounts to access hourly and resource-level information for the past 14 days. Resource-level information is only available for your Amazon EC2 service usage.

Please note that it can take up to 24 hours for your data to become available, and a cost of $0.01 per 1,000 UsageRecords-month will be incurred as a result of storing and accessing your hourly- and resource-level information. A UsageRecord is defined as one line of usage. For example, one EC2 instance running for 24 hours will generate 24 distinct UsageRecords at the hourly granularity.

After this settings, you can run CE API Calls. e.g

aws ce get-cost-and-usage --time-period Start="2020-07-07T10:00:00Z",End="2020-07-07T11:00:00Z" --granularity HOURLY --metrics "BlendedCost" --group-by Type=DIMENSION,Key=SERVICE Type=TAG,Key=Environment

One thing to note is that, in case of HOURLY, the time format must be in yyyy-MM-ddThh:mm:ssZ format.

over 4 years ago · Santiago Trujillo Report

0

You can opt-in to hourly granularity on the AWS Cost Explorer Settings page.

If you have a single account, this can be done inside the account.

If your account is part of an AWS Organization, it must be done from the Organization’s payer account.

over 4 years ago · Santiago Trujillo Report

0

You can enable hourly reporting here

https://console.aws.amazon.com/cost-management/home?#/settings

enter image description here

The feature was released Nov 13, 2019 and you can find the costs associated here

https://aws.amazon.com/about-aws/whats-new/2019/11/aws-cost-explorer-supports-hourly-resource-level-granularity/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!