How It Works

- Select the AWS Service:
- Choose the specific AWS service for your resource(s)
- This selection helps optimize the query efficiency
- Specify the Pricing Model:
-
Choose between:
- General services (rate not impacted by the number of days in the month)
- Storage services like EBS/S3 (rate is GB-Month)
- Cost Calculation:
- The step calculates the daily cost for the previous 4 days
- This approach accounts for potential delays in the Cost and Usage Report (CUR) updates
- Select Cost Type:
-
Choose from:
- Unblended - The actual AWS usage charge for the hour, day, or month without any averaging or spreading of Reserved Instance or Savings Plan costs
- Amortized - The AWS costs evenly distributed across the billing period, typically showing how Reserved Instance and Savings Plan upfront payments are spread over their term
- Net** **Unblended - The raw AWS usage charges minus any applied credits, refunds, or discounts for that specific billing period
- Net** **Amortized - The spread-out AWS costs (including distributed RI and SP costs) after subtracting any credits, refunds, or discounts
- **Exclusions **(Highly Recommended):
-
Option to exclude:
- Tax - A mandatory charge added to AWS services based on your location and local tax regulations
- Discounts - Reductions in AWS pricing through programs like Enterprise Discount Program (EDP) or volume-based pricing tiers
- Credits - AWS-provided funds (like promotional or support credits) that can be automatically applied to offset future AWS service charges
- Refunds - Money returned to your payment method for AWS service issues, billing errors, or unused Reserved Instance time
Important Considerations
Cost Calculation Methodology
The system calculates projected costs using the following methodology:- The process begins by retrieving daily cost data from 4 days prior, accounting for potential delays in Cost and Usage Report (CUR) updates
- This single day’s cost serves as the baseline for all cost projections
- Monthly costs are calculated by multiplying the daily cost by the number of days in the current month
- Annual cost projections are determined by multiplying the daily cost by 365 days
The Query Behind the Calculations
To give you a deeper understanding of how costs are calculated, here’s an example of the query used (in this case, for EC2 storage):- Determines the sample date (4 days ago)
- Calculates the daily cost for specified resources
- Determines the number of days in the current month
- Projects monthly and annual costs based on the daily cost
Edge Case: New, Stopped, or Short-lived Resources
It’s important to note that cost calculations may be inaccurate in certain scenarios:- If the resource didn’t exist 4 days ago
- If the resource wasn’t running for a full 24 hours in the past 4 days
- Stopped resources identified in the CLI response that have not generated any associated costs
Example Usage
Let’s say you want to get the cost for two EC2 instances:- Select “EC2” as the AWS Service
- Choose “General services” for the pricing model
- Select your preferred cost type (e.g., “Amortized”)
- Exclude Tax, Credits, and Refunds
-
Input the resource IDs:
['i-1234567890abcdef0','i-0987654321fedcba0']