Sub topic 11
Checking assumptions and understanding accuracy limits
This chapter assumes you can build a basic estimate in the AWS Pricing Calculator. It also assumes you know the core services (EC2, S3, RDS), understand AWS Regions, and can read a monthly cost breakdown. Here you learn to test an estimate before you trust it, and to know where it stops being reliable.
What an estimate is
An estimate is a forecast built from your inputs. The calculator multiplies the quantities you enter by list prices and adds the results. It does not observe your workload. If an input is wrong, the total is wrong by the same proportion, and the calculator will not warn you.
Three things limit accuracy:
- Input error. Your usage numbers are guesses about the future.
- Model error. The calculator covers the pricing dimensions it exposes. A real workload can incur charges you did not add.
- Price drift. Prices, discounts, and Free Tier eligibility can change after you save the estimate.
Checking assumptions mostly means reducing the first two. You cannot remove the third, but you can record when the estimate was made.
Common sources of error
The table lists the errors that most often make an estimate too low or too high.
| Source | Typical effect | How to check |
|---|---|---|
| Instances assumed to run 100% of the month when they are scheduled | Too high | Compare utilization with your real schedule |
| Peak load used as average load | Too high | Use monitoring data for average and peak separately |
| Data transfer left out | Too low | Add outbound, cross-Region, and cross-AZ traffic |
| Supporting services missing (load balancer, NAT gateway, logs, backups) | Too low | Walk the architecture diagram and match each box to a line item |
| Wrong Region | Either way | Confirm each service uses the Region you deploy to |
| Free Tier applied to a long-running workload | Too low after the first 12 months for services with 12-month offers | Check which offer applies and when it ends |
| Commitment discount assumed but not purchased | Too low | Compare an On-Demand total with the committed total |
| Storage growth ignored | Too low over time | Model month 1 and month 12 separately |
Underestimates are usually more damaging than overestimates, because they surface as an unplanned bill. Most of the errors that cause them are omissions, which is why a checklist works better than recalculating the numbers you already have.
A review method
Review an estimate in a fixed order. Each step catches a different class of mistake.
- Trace the architecture. List every component in your design. For each one, find the line item in the estimate or write down why none exists.
- Check units. A request count in millions entered as thousands, or gigabytes entered as terabytes, shifts a line by a factor of 1,000. Read each unit label before reading the number.
- Check the time basis. Decide whether a value is per hour, per day, or per month. Many calculator fields let you pick the unit. Confirm the choice.
- Check Region and configuration. Instance family, size, operating system, storage type, and Region all change the price.
- Test the totals against a rough calculation. Redo the largest line items by hand.
- Write down each assumption. Record the source of every number: a load test, current monitoring, a vendor figure, or a guess.
The diagram shows the review as a loop. A failed check sends you back to change inputs, not to accept the total.
Sanity-checking a line item by hand
The largest lines in most estimates are compute, storage, and data transfer. You can recompute compute lines yourself. The following function mirrors what the calculator does for On-Demand instances.
HOURS_PER_MONTH = 730 # average hours in a month, a common basis for monthly estimates
def monthly_compute_cost(hourly_rate, instance_count, utilization=1.0):
"""Estimate monthly On-Demand compute cost.
utilization is the fraction of the month the instances run (0 to 1).
"""
return hourly_rate * HOURS_PER_MONTH * utilization * instance_count
# hourly_rate is an illustrative placeholder, not a current AWS price.
example_rate = 0.02
print(round(monthly_compute_cost(example_rate, instance_count=3, utilization=0.5), 2))With a rate of 0.02, three instances at half utilization come to 0.02 × 730 × 0.5 × 3 = 21.90. If the calculator shows a very different value for the same inputs, one of these is likely the cause:
- The calculator uses a different utilization or time basis than you assumed.
- The configuration is not the one you thought. The operating system, tenancy, or instance size can differ.
- The rate you used is not the rate for that Region.
Always run the hand calculation with a real rate for your Region, not a placeholder. The placeholder above only shows the arithmetic.
Sensitivity: which inputs matter most
You do not need to verify every input with equal care. Change one input at a time by a meaningful amount, such as 20% or 50%, and watch the total. Inputs that move the total the most deserve measured data. Inputs that barely move it can stay rough.
For example, in a web application, outbound data transfer might dominate the bill. A 50% error in the number of instances then matters less than a 50% error in monthly traffic. Spend your validation effort where the total is most sensitive.
A useful practice is to build three versions of an estimate: low, expected, and high. Present them together. A range communicates uncertainty honestly, and a single number hides it.
Use real data wherever you have it
Guessed inputs are the largest source of error. When you have an existing workload, replace guesses with measurements:
- Compute: average and peak CPU and memory from monitoring, plus the hours instances actually run.
- Storage: current size and monthly growth rate.
- Requests: counts per month from service metrics or access logs.
- Data transfer: bytes out by destination, from flow logs or load balancer metrics.
- Past bills: the Cost Explorer breakdown by service and usage type, which shows what you really used.
For a new workload with no history, run a short load test or a proof of concept and extrapolate. State the extrapolation method in your assumptions, such as "traffic scales linearly with users". Linear scaling is often wrong, so name it as a risk.
Cross-checking against a source of truth
Two cross-checks help when you cannot measure the workload.
Compare with a similar running workload. If a comparable system exists in your account, its cost per unit (per user, per request, per transaction) gives a ratio to apply to the new workload's size.
Compare list prices. The calculator shows a rate per line item. You can confirm the rate against the AWS Price List Query API. This catches a wrong instance type, Region, or operating system selection, because the filters must match the configuration exactly.
aws pricing get-products \
--region us-east-1 \
--service-code AmazonEC2 \
--filters \
"Type=TERM_MATCH,Field=instanceType,Value=t3.micro" \
"Type=TERM_MATCH,Field=location,Value=US East (N. Virginia)" \
"Type=TERM_MATCH,Field=operatingSystem,Value=Linux" \
"Type=TERM_MATCH,Field=tenancy,Value=Shared" \
"Type=TERM_MATCH,Field=preInstalledSw,Value=NA" \
"Type=TERM_MATCH,Field=capacitystatus,Value=Used" \
--max-items 1The command returns the product record for one configuration, including its On-Demand price per hour. If it differs from the calculator's rate, compare the configuration filters with the options you chose in the calculator.
Where the calculator cannot be accurate
Some limits are built into the tool. Know them so you do not over-trust the total.
- It reflects list pricing. Private pricing agreements, volume tiers beyond what you model, and credits may change your actual rate. Treat the estimate as a planning figure, and not as a quote.
- It does not model behavior. Autoscaling, spot interruptions, retries, and traffic spikes change real usage in ways a fixed input cannot capture. Model average and peak scenarios separately.
- Usage-based services are hard to predict. Services billed per request, per query, or per gigabyte processed can swing widely with small changes in application behavior. A chatty application can multiply request counts.
- It estimates only what you add. Charges from services you forgot, from misconfiguration, or from resources left running after a test are outside the estimate.
- Prices change. An estimate is a snapshot. Revisit it when you plan a deployment months after you created it.
Because of these limits, treat the estimate as the opening position of a cost conversation. The comparison against real billing closes the loop.
Comparing the estimate with real billing
After the workload runs, compare the estimate with actual cost. This is the only way to learn how accurate your method is.
- Export or note the estimate's per-service totals.
- Pull actual cost by service from Cost Explorer for the same period.
- Calculate the variance for each service:
(actual - estimate) / estimate. - Investigate lines with large variance, starting with the largest in dollars.
- Update your assumptions and your method for the next estimate.
Look at the cause of each variance, not just its size. A line that is 40% over because traffic doubled is a usage forecast problem. A line that is 40% over because a NAT gateway was missing is a completeness problem. The fixes differ.
You can also set a budget alert near the estimated total so that drift is visible early, before the month closes.
Documenting assumptions
An estimate without recorded assumptions cannot be reviewed. For each major line, note:
- The input value and its source (measured, load-tested, or guessed).
- Your confidence in it (high, medium, low).
- What would change it, such as a traffic campaign or a new feature.
Put this in the estimate's description or in a linked document. The reviewer then knows which numbers to question first, and you know what to revisit when actual costs differ.
Summary of practice
- Trace every architecture component to a line item.
- Verify units, time basis, and Region.
- Replace guesses with measurements for the inputs the total is most sensitive to.
- Present a range, not a single figure.
- Compare against actual billing and record the variance.
Exercise
Your estimate for a web application totals $1,200 per month. The first real bill is $1,900. Cost Explorer shows compute within 5% of the estimate, but the largest gap is in data transfer and NAT gateway charges, neither of which was in the estimate. What kind of error is this, and what two changes should you make?
Show answer
This is a completeness (model) error, not a usage-forecast error, because the missing charges came from components absent from the estimate. First, add line items for outbound data transfer and the NAT gateway (including its per-gigabyte processing charge) using measured traffic. Second, change your review method so that every component in the architecture diagram is traced to a line item before the estimate is shared. Keep the original estimate and record the variance.
Exercise
A hand calculation of a compute line gives $21.90 per month, but the calculator shows $43.80 for the same instance count and rate. Name two likely causes and how you would find out which applies.
Show answer
Likely causes are a utilization or time-basis mismatch (the calculator assumes the instances run all month while you assumed half the month, which is exactly a factor of two here) and a different configuration than you assumed. Open the line item and read the utilization or usage field and its unit. Then compare the instance type, operating system, tenancy, and Region with your hand calculation. You can also check the list rate with the Price List API using filters that match the line item.