Sub topic 9
Organizing an estimate with groups
This chapter assumes you can add a service to an estimate and configure it (Region, size, usage), as covered in the earlier chapters. You should also be comfortable reading a monthly cost breakdown. It covers how to use groups to keep a growing estimate readable, comparable, and easy to review.
Why groups exist
A small estimate might hold three or four services. A realistic one often holds dozens of line items: several EC2 configurations, an RDS database, S3 buckets, load balancers, NAT gateways, data transfer, monitoring. In a flat list, a reviewer sees one long column of line items and one total. They cannot easily answer questions such as:
- How much does the production environment cost compared with staging?
- What share of the total is the data layer?
- If we drop the analytics component, how far does the total fall?
A group is a named container inside one estimate. You put related services in it, and the calculator shows a subtotal for that group. The estimate total is still the sum of everything, so grouping changes how the estimate is presented, not what it costs. The prices, the Region and the usage inputs of each service stay the same.
What a group does and does not do
| Question | Answer |
|---|---|
| Does a group change the price of a service? | No. Price comes from the service configuration and usage inputs. |
| Does a group give a discount? | No. Discounts come from purchase options and the Free Tier, set at the service level. |
| Does the total change if I move a service between groups? | No. Only the subtotals change. |
| Can I use groups to represent a business boundary? | Yes. Environments, teams, applications, and project phases are common choices. |
| Does a group create a cost allocation tag or a billing boundary in your real account? | No. A group exists only in the estimate. |
The last row matters. Groups help you plan and discuss costs. They do not create anything in your AWS account. If you later want actual costs split by team or environment, that is done with tags and cost allocation in billing, which is a separate mechanism.
Choosing a grouping strategy
Pick one organizing question and use it consistently. Mixing strategies in one estimate (for example, one group per team and another per environment) makes subtotals overlap in meaning, and readers will lose track of which group holds what.
Common strategies:
- By environment. Groups such as
Production,Staging, andDevelopment. This works well when environments are similar copies at different sizes, and it makes the "what does staging cost?" question trivial. - By application tier. Groups such as
Web,Application,Data, andNetworking. This suits architecture reviews where you want to see which tier dominates. - By component or team. Groups such as
Checkout serviceandSearch service. This suits chargeback or budget conversations. - By project phase. Groups such as
Migration (temporary)andSteady state. This separates one-time or short-lived costs from recurring ones, which matters because a monthly total that mixes both misleads.
Creating and using groups in the console
The exact button labels can change as the calculator is updated, so treat these steps as the general flow.
- Open your estimate in the AWS Pricing Calculator.
- Create a group and give it a clear name. Names appear in the summary and in exports, so write them for a reader who did not build the estimate.
- Add services directly into the group, or move services you already configured into it.
- Review the group subtotal and the estimate total.
- Rename, reorganize, or delete groups as the design changes.
If you plan the group structure before adding services, you avoid moving items later. If you inherit a flat estimate, create the groups first, then move each line item. After moving, confirm the total did not change. A changed total means you edited a configuration by accident, not that grouping failed.
Handling shared costs
Shared costs are the hardest part of grouping. Examples are a NAT gateway used by both production and staging, a shared logging bucket, or a transit connection. You have three reasonable options:
- Put them in their own group (for example
Shared). This is the most honest option and the easiest to defend, because nothing is split by guesswork. - Assign each to its largest user. This is simple but hides the fact that others rely on it.
- Split by a stated rule. For example, create two line items and divide the traffic estimate 70/30 by expected volume. Document the rule in the service description or in your handoff notes.
Whichever you choose, write the rule down. A reader who sees Production at a surprising subtotal needs to know whether it includes a share of shared networking.
Data transfer deserves special attention here. It is often easy to forget, and it is tempting to bury it in one group. If traffic crosses environments, Regions, or goes out to the internet, a separate Data transfer group or clearly named line items make that cost visible, so reviewers can challenge it. The data transfer chapter covers how to size it.
Using groups for comparison and what-if analysis
Groups are a lightweight way to compare designs inside one estimate. Suppose you are deciding between running a database on a larger instance or adding a read replica. Put each design in its own group (Option A: single large DB, Option B: primary + replica) and compare the subtotals. Before you share the estimate, remove the group you rejected, or rename the groups so the final one is obvious. Otherwise the total counts both options, which overstates the cost of any single design.
The same trick works for purchase options. Put the same instances in a group called Compute: On-Demand and a group called Compute: 1-year Savings Plan, and compare. Again, delete or clearly mark one of them before treating the estimate total as a forecast.
Checking subtotals by hand
A useful review habit is to recompute a group subtotal outside the calculator. This catches mistaken quantities, wrong utilization values, and services that landed in the wrong group. The script below extends the hand calculation from earlier in the tutorial. It computes subtotals per group from a small list of line items and then sums them.
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."""
return hourly_rate * HOURS_PER_MONTH * utilization * instance_count
# Rates are illustrative placeholders, not current AWS prices.
groups = {
"Production": [
("web servers", monthly_compute_cost(0.02, instance_count=4)),
("batch workers", monthly_compute_cost(0.02, instance_count=2, utilization=0.25)),
],
"Staging": [
("web servers", monthly_compute_cost(0.02, instance_count=1, utilization=0.5)),
],
}
total = 0.0
for name, items in groups.items():
subtotal = sum(cost for _, cost in items)
total += subtotal
print(f"{name}: {subtotal:.2f}")
print(f"Estimate total: {total:.2f}")Compare each printed subtotal with the calculator's group subtotal. Small differences can come from rounding or from items such as storage that you did not include in the script. A large gap points to a configuration error: a wrong instance count, a utilization left at 100%, or a service placed in the wrong group.
Common mistakes
- Duplicated services across groups. Copying a service to a second group to "see it there too" counts its cost twice. Each real resource should appear once.
- Inconsistent grouping scheme. Mixing environment groups with team groups makes subtotals hard to interpret.
- Vague names.
Group 1orMisctell the reviewer nothing. Name groups after what they contain and, where useful, the assumption behind them (Production, 3-AZ). - One huge catch-all group. If most of the cost sits in a group called
Other, the groups are not doing their job. Split it. - Forgetting the supporting services. Load balancers, NAT gateways, monitoring, and backups are easy to leave out of a group because they are not the main application. Add them to the group they serve.
- Treating groups as billing structure. Groups exist only in the estimate. They do not tag resources or affect your bill.
Connecting groups to sharing and review
Groups pay off most when the estimate leaves your hands. A manager reading a summary can scan group subtotals and ask targeted questions, instead of working through every line item. The next chapter covers saving, sharing, and exporting estimates, and the group structure you set up here is what the reader will see. A structure that took ten minutes to plan usually saves the reviewer much longer.
Exercise
You are estimating a web application with Production and Staging environments. Both use the same NAT gateway, and you also kept two database designs as separate groups for comparison. Describe how you would organize the groups so that the final estimate total is a fair monthly forecast, and name two things to check before sharing it.
Show answer
Use one grouping scheme, by environment: a Production group, a Staging group, and a Shared group for the NAT gateway (or two NAT line items split by a documented traffic rule). Put only the chosen database design in Production and Staging, and delete the rejected design group so its cost is not added to the total. Before sharing, check that (1) no resource appears in more than one group, so nothing is counted twice, and (2) group subtotals match a hand recalculation, with the group names and the shared-cost rule clear enough for a reader who did not build the estimate.