Sub topic 1
Estimating Costs with the AWS Pricing Calculator
Prerequisites
Assume you know the basics of EC2, S3, and RDS, understand AWS Regions, and can read a monthly cost breakdown.
How AWS charges: pricing dimensions
AWS prices a service through pricing dimensions: measurable properties that determine the charge. Common dimensions include:
- Compute time, such as instance-hours or vCPU-hours.
- Storage capacity, such as gigabyte-months.
- Requests, such as API calls.
- Data transfer, usually measured in gigabytes.
- Features, such as provisioned IOPS or database engines.
The same service can have different prices when you change its Region, size, operating system, tenancy, or purchase option.
| Dimension | Example input | Typical effect |
|---|---|---|
| Region | US East (N. Virginia) | Changes the regional rate |
| Usage | 730 instance-hours | Sets the billed quantity |
| Size | t3.micro | Changes capacity and price |
| Data transfer | 100 GB out | Adds network charges |
What the AWS Pricing Calculator is and is not
The AWS Pricing Calculator is a planning tool. It multiplies service prices by your usage assumptions and presents an estimated monthly total. It helps compare architectures and Regions before deployment.
It is not a bill, a capacity plan, or a guarantee of future charges. Taxes, promotional credits, changing prices, unmodeled services, and inaccurate usage assumptions can make the final bill differ.
HOURS_PER_MONTH = 730
def monthly_compute_cost(hourly_rate, instance_count, utilization=1.0):
return hourly_rate * HOURS_PER_MONTH * utilization * instance_count
print(monthly_compute_cost(0.02, instance_count=3, utilization=0.5))Estimates, services, and configurations
An estimate is the complete cost model. It contains services such as Amazon EC2 or Amazon S3. Each service contains one or more configurations, which are sets of choices and usage values.
For example, an EC2 configuration might specify a Region, instance type, operating system, running hours, and data transfer. Separate configurations are useful when production and development workloads have different assumptions.
Configuring a service: Region, size, and options
Start with the deployed design, not a desired budget. Select the Region where the resource will run. Choose the size and operating system. Then add options such as storage type, backup retention, requests, or data transfer.
Record each assumption. A low estimate can be misleading if it omits attached storage, monitoring, NAT gateways, or outbound traffic.
Exercise
Why can two identical EC2 instance types have different monthly estimates?
Show answer
Their Region, operating system, purchase option, runtime, or related usage can differ.