Table: aws_cost_forecast_daily - Query AWS Cost Explorer Daily Cost Forecast using SQL
The AWS Cost Explorer Daily Cost Forecast is a feature of AWS that allows you to predict your future AWS costs based on your past spending. It uses machine learning algorithms to create a model of your past behavior and estimate your future costs. It provides an SQL interface for querying these forecasts, making it easy to integrate into your existing data analysis workflows.
Table Usage Guide
The aws_cost_forecast_daily
table in Steampipe provides you with daily cost forecasts within AWS Cost Explorer. This table allows you, as a financial analyst, DevOps engineer, or cloud administrator, to query forecasted daily costs based on historical data. You can utilize this table to gather insights on your future costs, such as projected increases or decreases in expenses, cost trends, and more. The schema outlines the various attributes of your daily cost forecast, including the date, forecasted amount, and forecasted unit.
Amazon Cost Explorer helps you visualize, understand, and manage your AWS costs and usage. The aws_cost_forecast_daily
table retrieves a forecast for how much Amazon Web Services predicts that you will spend each day over the next 4 months, based on your past costs.
Important Notes
- The pricing for the Cost Explorer API is per API request - Each request you make will incur a cost of $0.01.
Examples
Basic info
Explore the daily cost forecast for AWS, allowing you to understand and predict your expenditure over time. This can assist in budget planning and identifying potential cost-saving opportunities.
select period_start, period_end, mean_value :: numeric :: moneyfrom aws_cost_forecast_dailyorder by period_start;
select period_start, period_end, cast(mean_value as decimal) as mean_valuefrom aws_cost_forecast_dailyorder by period_start;
Schema for aws_cost_forecast_daily
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
mean_value | double precision | Average forecasted value | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
period_end | timestamp with time zone | End timestamp for this cost metric | |
period_start | timestamp with time zone | Start timestamp for this cost metric | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_cost_forecast_daily