Skip to content

Feature Request: API to programmatically enable Cost Explorer preferences (resource-level data and granular settings)

0

Currently, there is no API or CloudFormation/Terraform resource to programmatically enable Cost Explorer preferences, specifically the "Resource-level data at daily granularity" setting. This must be done manually through the AWS Console at:

Cost Management > Preferences > Cost Explorer > Historical and granular data

Current Limitation

When managing AWS Organizations with multiple accounts or automating infrastructure deployment, we cannot include Cost Explorer preference configuration in our Infrastructure-as-Code workflows. This requires manual console access to the management account and creates:

  1. Consistency issues - Settings may be configured differently across accounts or Organizations
  2. Automation gaps - Cannot fully automate account setup for cost visibility
  3. Scalability problems - Manual configuration doesn't scale for organizations with many accounts
  4. Onboarding friction - New teams/accounts require manual intervention by admins

Requested Feature

Add API support for Cost Explorer preference management, including:

API Actions:

  • UpdateCostExplorerPreferences - Configure all preference settings
  • GetCostExplorerPreferences - Retrieve current settings
  • EnableResourceLevelData - Specifically enable resource-level tracking for services

CloudFormation/Terraform Support:

  • AWS::CostExplorer::Preferences CloudFormation resource
  • aws_ce_preferences Terraform resource

Example Use Case:

import boto3

ce_client = boto3.client('ce')

# Enable resource-level data for specific services
ce_client.update_cost_explorer_preferences(
    EnableMultiYearData=True,
    ResourceLevelData={
        'Enabled': True,
        'Services': ['ALL_SERVICES'],
        'Granularity': 'DAILY'
    }
)

Business Impact

  • DevOps Teams: Can include cost monitoring setup in CI/CD pipelines
  • FinOps Teams: Can ensure consistent cost visibility across all accounts
  • Enterprise Organizations: Can automate onboarding with proper cost tracking from day one
  • Compliance: Can enforce cost visibility standards programmatically

Workaround

Currently, the only workaround is manual console configuration by someone with management account access, which doesn't scale.

Related AWS Services

This feature would complement existing programmatic capabilities:

  • Cost Allocation Tags API (recently added)
  • Cost Explorer API for querying data
  • AWS Budgets API
  • Cost Anomaly Detection API

All of these allow programmatic management except for the initial preference configuration itself.

Additional Context

  • The Cost Explorer API already exists for querying data, but there's no API to configure the preferences that determine what data is available
  • Cost allocation tags now have API support (via aws_ce_cost_allocation_tag)
  • This gap affects both small teams and large enterprises managing multiple AWS Organizations

asked a year ago275 views

1 Answer
0

Please be informed that, I have submitted a feature request upon your behalf with the internal team to let them know there is customer demand for this feature. However, I cannot provide an ETA on when the feature will be available as the resolution will be based on the priority set by our back-end team. As soon as it gets released, it should be publicly announced in either one of the following links:

-- What's New: http://aws.amazon.com/new/

-- Blog: https://aws.amazon.com/blogs/aws/

AWS
SUPPORT ENGINEER

answered a year 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.