By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS Cost Explorer

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Calculating NetAmortisedCost via Cost and Usage Report

**Issue:** Unable to calculate netamortisedcost from Cost and Usage Report (CUR) data But AWS Cost Explorer still shows it. **Usecase:** we ingest Cost and Usage Reports (CSV files) internally into our BI system for cost management and also do few other things on top of it. We know that there are some columns in CUR which only comes when there is any savings plan or RIs applied for the corresponding aws account(s). If there are no savings plan / RIs applied, then AWS Cost explorer also should not show the netamortised cost calculation. Since it does, we want to understand how we can do the same using the data in cost and usage report. We use below SQL query to generate the netamortised cost. This has been working fine for us for some months. But for some other months this returns 0 netamortisedcost while AWS Cost explorer shows this metric. This query is for netamortisedcost calculation but is ported from wellarchitectedlabs.com for amortised cost calculation. ``` CASE WHEN (lineitemtype = 'SavingsPlanNegation') THEN 0 WHEN (lineitemtype = 'SavingsPlanUpfrontFee') THEN 0 WHEN (lineitemtype = 'SavingsPlanCoveredUsage') THEN NetSavingsPlanEffectiveCost WHEN (lineitemtype = 'SavingsPlanRecurringFee') THEN (TotalCommitmentToDate - UsedCommitment) WHEN (lineitemtype = 'DiscountedUsage') THEN NetEffectiveCost WHEN (lineitemtype = 'RIFee') THEN (NetUnusedAmortizedUpfrontFeeForBillingPeriod + NetUnusedRecurringFee) WHEN ((lineitemtype = 'Fee') AND (ReservationARN <> '')) THEN 0 ELSE NetUnblendedCost END netAmortisedCost ``` How AWS Cost Explorer is showing this cost metric even when there is no SP/RIs applied.
0
answers
0
votes
14
views
asked 5 days ago

AWS compute savings plan commitment calculation

I am trying to understand how the commitment per hour calculation has been done for AWS Savings plan recommendation for past 30 days. There is no document on how to calculate it, how is the calculation done for leaving the on-demand spend? As per the below usage of the services mentioned in below table, AWS cost explorer is recommending below commitment... "You could save an estimated $315 monthly by purchasing the recommended Compute Savings Plan. Based on your past 30 days of usage, we recommend purchasing 1 Savings Plan with a total commitment of $1.390/hour for a 1-year term. With this commitment, we project that you could save an average of $0.43/hour - representing a 17% savings compared to On-Demand. To account for variable usage patterns, this recommendation maximizes your savings by leaving an average $0.65/hour of On-Demand spend. Recommendations require up to 24 hours to update after a purchase." So we came to a conclusion that we should spend 0.65/hour of On-demand and 1.390/hour of commitment? Please suggest and share how we can calculate all this information if I need to do that with a different set of data. | Service| Intance family| instance type| No. of instances| Region | On-demand Spend ($) | On-demand Usage | On-demand rate | SP rate | SP Spend | % discount | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | EC2 | t2| micro | 1 | US East (N. Virginia) | 8.352| 720| 0.0116 | 0.0078 | 5.616 | 33% | | EC2 | t2| nano | 1 | EU (Ireland) | 4.536 | 720 | 0.0063 | 0.0048 | 3.456 | 24% | | EC2 | t2 | micro | 6 | EU (Ireland) | 53.837658 | 4,272.83 | 0.0126000000 | 0.0095 | 40.591885 | 25% | | EC2 | t2 | large | 1 | EU (Ireland) | 72.576 | 720 | 0.1008 | 0.0761 | 54.792 | 25% | | EC2 | c6a | large | 1 | EU (Ireland) | 38.4495552| 468.44 | 0.08208 | 0.05854 | 27.4224776 | 29% | | EC2 | c4 | 4xlarge | 1 | EU (Ireland) | 421.73| 466 | 0.905 | 0.667 | 310.822 | 26% | | Fargate | | GB-Hours | | EU (Ireland) | 224.9872755| 50615.81 | 0.0044450000 | 0.0034671 | 175.4900749 | 22% | | Fargate | | vCPU-Hours | | EU (Ireland) | 916.9323152 | 22651.49 | 0.0404800000 | 0.0315744 | 715.2072059 | 22% | | Lambda | | EU-Lambda-GB-Second (Second) | | EU (Ireland) | 28.250059 | 1695000.15 | 0.0000166667 | 0.0000138 | 23.39100207 | 17% | | Lambda | | EU-Request (Requests) | | EU (Ireland) | 0.94 | 4688540 | .20 | .20 | 0.94 | 0% | | **Total **| | | | | 1770.590863 | | 1.363321667 | 1.0587953 | 1357.728645 | |
1
answers
0
votes
91
views
asked 4 months ago