Sub topic 9
Organizing an estimate with groups
This chapter assumes you can add and configure a service in the AWS Pricing Calculator and that you know the basics of EC2, S3, and RDS. It covers how to use groups to keep a growing estimate readable.
Why groups matter
A small estimate with three services is easy to read as a flat list. A real workload often has dozens of line items: web servers, a database, storage, load balancers, and data transfer. In a flat list you can't tell which part of the architecture drives the cost, and you can't compare one part against another.
A group is a named container inside an estimate. You add services to a group, and the calculator shows a subtotal for it. The estimate total is still the sum of everything. Groups change how you read the estimate, not what it costs.
Common ways to group
Pick one grouping rule and apply it to the whole estimate. Mixing rules makes subtotals hard to compare.
| Grouping rule | Example groups | Useful when |
|---|---|---|
| By environment | Production, Staging, Development | You want to see what non-production costs |
| By application tier | Web, Application, Database | You are reviewing an architecture |
| By team or project | Checkout, Search, Analytics | Different owners pay for different parts |
| By phase | Launch, Year 1 growth | Usage changes over time |
Grouping by environment is a good default. Staging often copies production's shape at lower scale, so a separate group shows how much a scaled-down copy adds.
Working with groups in the console
The exact button labels in the console can change, so check the current interface. The workflow is:
- Create an estimate and add your first service.
- Create a group and give it a clear name, such as
Production. - Add services to that group, or move existing services into it.
- Repeat for each group, then review the subtotals.
Choose names that make sense to someone who has never seen the estimate. Prod-DB is better than Group 2.
Worked example
Suppose you are estimating a small web application. You build two groups with the same services at different scales.
- Production: 3 EC2 instances running all month, one RDS database, and an S3 bucket.
- Staging: 1 EC2 instance running 8 hours a day on weekdays, a smaller RDS database, and a small S3 bucket.
The calculator then shows two subtotals. Say Production comes to 900 USD per month and Staging to 150 USD per month. You can now state that staging adds about 17 percent on top of production, and you can ask whether that is acceptable. With a flat list you would have to add up the line items by hand.
You can check a group subtotal the same way you check a single line item. Here is a small script that adds up rough subtotals for the example and shows each group's share of the total.
HOURS_PER_MONTH = 730 # average hours in a month
def compute_cost(hourly_rate, instance_count, utilization=1.0):
return hourly_rate * HOURS_PER_MONTH * utilization * instance_count
# Rates are illustrative placeholders, not current AWS prices.
groups = {
"Production": compute_cost(0.10, 3),
"Staging": compute_cost(0.10, 1, utilization=0.25),
}
total = sum(groups.values())
for name, cost in groups.items():
print(f"{name}: {cost:.2f} USD ({cost / total:.0%} of compute)")
print(f"Total: {total:.2f} USD")The utilization of 0.25 stands in for staging running about a quarter of the month. This script covers compute only, so it won't match a full group subtotal.
Visualizing the structure
Common mistakes
- Putting shared services in only one group. Items such as data transfer or a shared load balancer need a clear home, or a group may look cheaper than it is. Create a
Sharedgroup if needed. - Using inconsistent naming.
prod,Production, andPRDin one estimate make it confusing to review. - Grouping too finely. A group with one line item adds clutter without insight.
- Forgetting that the Free Tier applies to the account, not to each group. Don't assume every group gets its own free allowance.
Exercise
You are estimating an application with Production and Staging environments. Both use the same EC2 instance type, but Staging runs only during business hours. Should you create one group or two, and why?
Show answer
Create two groups, Production and Staging. Each group keeps its own usage inputs, such as hours per month, so the staging service can use a lower utilization. The separate subtotals also show how much staging adds to the total.