THE LINUX FOUNDATION PROJECTS
Docs navigation
On this page

    Analyze costs by availability zone for a subaccount

    This query uses the Provider column. Provider is deprecated in v1.3 and will be removed in v1.4.

    FOCUS Versions

    v1.0 v1.1 v1.2

    Context

    It is good practice for Engineering to monitor cost and usage of services by availability zone for all regions to ensure:

    • there isn’t any cost/usage occurring outside of the expected locations
    • your costs are spread according to an expected ratio

     

    FOCUS SQL Query

    SELECT
      ProviderName,
      RegionName,
      AvailabilityZone,
      BillingPeriodStart,
      SUM(EffectiveCost) AS TotalEffectiveCost
    FROM focus_data_table
    WHERE SubAccountId = ?
      AND ChargePeriodStart >= ? AND ChargePeriodEnd < ?
    GROUP BY
      ProviderName,
      RegionName,
      AvailabilityZone,
      BillingPeriodStart
     ORDER BY ProviderName,
      RegionName,
      AvailabilityZone,
      BillingPeriodStart

    FOCUS Datasets

    FOCUS Columns