Get the App

Chapter 9 of 11

Module 9: AWS Billing, Pricing Models, and Cost Optimization

Prepare for the Billing, Pricing, and Support domain by learning how AWS charges for services, what pricing models exist, and how to think about cost optimization at a foundational level.

15 min readen

Step 1 – How AWS Billing Works at a High Level

AWS billing is usage-based: you pay for what you use, usually per hour, per second, per GB, or per request.

For the CLF-C02, you do not need to memorize exact prices, but you do need to understand how AWS charges and how to compare options.

Think of three big buckets:

  1. Compute (e.g., EC2, Lambda, Fargate)
  • Common units: per second or per hour of compute capacity, sometimes per vCPU and GB of memory.
  • Example: An EC2 instance charged per hour; Lambda charged per request + GB-seconds of execution.
  1. Storage (e.g., S3, EBS, EFS)
  • Common units: GB per month stored, plus requests and some data transfer.
  • Example: S3 Standard charges per GB stored + per 1,000 requests.
  1. Data Transfer & Networking
  • Data in to AWS is usually free.
  • Data out to the internet is usually charged.
  • Data transfer within the same AZ can be free for some services; cross-AZ or cross-Region often has a cost.

Key exam idea: When you see a scenario where costs are unexpectedly high, think about:

  • Data transfer out to the internet or between Regions
  • Using more capacity than needed (oversized instances or wrong storage tier)
  • Not using a discount model (like Reserved Instances or Savings Plans) for predictable workloads

Step 2 – AWS Free Tier and Cost Visibility

AWS offers a Free Tier to help you experiment without large bills, but it is not unlimited.

Three types of Free Tier benefits (as of early 2026):

  1. Always Free
  • Available to all accounts, all the time.
  • Example: AWS Lambda includes a certain number of free requests and GB-seconds per month.
  1. 12 Months Free (after account creation)
  • Applies to many core services (e.g., EC2, S3, RDS) with small usage limits.
  • After 12 months, usage is charged at on-demand rates.
  1. Trials
  • Short-term offers for specific services (for example, 30-day trials) with defined limits.

Important exam nuance:

  • Free Tier is account-specific and time-limited.
  • Going beyond limits = normal charges.
  • Some services do not have a Free Tier.

To avoid surprises, AWS provides cost visibility tools (high-level for CLF-C02):

  • AWS Billing & Cost Management Console – view bills, set billing preferences.
  • AWS Cost Explorer – visualize spending over time.
  • AWS Budgets – set custom budgets and alerts.
  • AWS Pricing Calculator – estimate costs before deploying.

You should be able to recognize when a scenario suggests using these tools (e.g., “The finance team wants to understand trends in AWS spending over the last 12 months…”Cost Explorer).

Step 3 – Core Pricing Models Overview

For compute services like Amazon EC2, AWS offers four main pricing models you must recognize:

  1. On-Demand
  2. Reserved Instances (RIs)
  3. Savings Plans
  4. Spot Instances

Think of them along a spectrum:

  • Flexibility ⬆ → Cost per unit ⬆ (On-Demand)
  • Commitment ⬆ → Cost per unit ⬇ (RIs and Savings Plans)
  • Interruption risk ⬆ → Cost per unit ⬇⬇ (Spot)

You’ll mostly see these in EC2 questions, but the concepts also apply to other compute services (e.g., Fargate, Lambda) via Savings Plans.

In the next steps, we’ll compare them using the same simple scenario so you can see how they differ.

Step 4 – Example Scenario: A Simple Web App

Use this scenario in your head for the next few steps:

> A company runs a small web application on one EC2 instance. The app:

> - Runs 24/7.

> - Has predictable, steady traffic.

> - Must be highly available (can’t be stopped randomly).

Now, we’ll walk through which pricing model fits best and why.

Option A: On-Demand

  • You pay per second or per hour with no long-term commitment.
  • Pros: Maximum flexibility; good for short-term, spiky, or unpredictable workloads.
  • Cons: Most expensive per hour for long-running workloads.

Option B: Reserved Instances (RIs)

  • You reserve capacity for 1 or 3 years.
  • You choose:
  • Standard vs. Convertible RIs (Standard = higher discount, less flexibility; Convertible = lower discount, more flexibility).
  • Payment options: All Upfront, Partial Upfront, or No Upfront.
  • Pros: Significant discount (often up to 72% off On-Demand) for steady-state usage.
  • Cons: Tied to specific instance attributes (for Standard RIs) and a time commitment.

Option C: Savings Plans

  • You commit to a certain $/hour spend on compute for 1 or 3 years.
  • Two main types:
  • Compute Savings Plans – flexible across instance families, Regions, and even services (EC2, Fargate, Lambda).
  • EC2 Instance Savings Plans – narrower scope but can offer slightly better discounts.
  • Pros: Similar discounts to RIs but more flexibility, especially with Compute Savings Plans.
  • Cons: Still a time-based commitment; you must estimate your baseline usage.

Option D: Spot Instances

  • You use unused EC2 capacity at a very large discount (up to ~90% off On-Demand).
  • But AWS can interrupt (reclaim) the instance with 2 minutes’ notice when capacity is needed.
  • Pros: Extremely low cost when workloads are fault-tolerant and flexible.
  • Cons: Not suitable for steady, interruption-sensitive production workloads.

For our web app scenario:

  • Best fit: Reserved Instances or Savings Plans (steady, predictable, 24/7 usage).
  • Acceptable but more expensive: On-Demand.
  • Bad idea: Spot (app can’t be interrupted randomly).

Step 5 – Match Workloads to Pricing Models (Thought Exercise)

Mentally match each workload to the most cost-effective, realistic pricing model. Then check the suggested answers below.

Workload 1

A development environment used only on weekdays from 9 AM to 5 PM, sometimes scaled up and down.

Workload 2

A core payment processing system that runs 24/7 with stable, predictable load and strict uptime requirements.

Workload 3

A big data analytics job that runs once per night for a few hours; if it’s interrupted, it can just restart or use checkpoints.

---

Suggested answers (don’t peek until you’ve thought about it):

  • Workload 1 – On-Demand (or mix with Savings Plans)

Why: Usage is not 24/7 and can change. You might script turning instances off at night/weekends; flexibility is valuable. A Compute Savings Plan could still help if the overall dev usage is somewhat predictable.

  • Workload 2 – Reserved Instances or Savings Plans

Why: Steady, predictable, mission-critical → commit for 1–3 years to reduce cost.

  • Workload 3 – Spot Instances

Why: Fault-tolerant, batch analytics, can handle interruptions → perfect for Spot to minimize cost.

Step 6 – How AWS Charges for Compute, Storage, and Data Transfer

You don’t need exact prices, but you must know the dimensions AWS uses to bill.

1. Compute

EC2

  • Billed by instance type, Region, operating system, and time running (per second or hour depending on OS and instance).
  • Additional charges for:
  • EBS volumes attached
  • Data transfer out

Lambda

  • Number of requests.
  • Duration of execution (GB-seconds), based on memory configured.

Fargate

  • vCPU-hours and GB-hours of memory for running tasks.

2. Storage

S3

  • GB per month stored, per storage class (Standard, Standard-IA, One Zone-IA, Glacier classes, etc.).
  • Requests (PUT, GET, LIST, etc.).
  • Data transfer out of S3 (to internet or cross-Region).

EBS

  • GB per month of provisioned storage (type: gp3, io2, etc.).
  • Provisioned IOPS and throughput for some volume types.
  • Snapshots stored in S3-like storage (charged per GB).

3. Data Transfer

  • Data in to most AWS services from the internet: usually free.
  • Data out to the internet: charged per GB, price often decreases with higher usage tiers.
  • Within AWS:
  • Same AZ, same service: often free.
  • Cross-AZ or cross-Region: usually charged.

Exam pattern: If a question mentions unexpectedly high costs and a system that sends lots of data across Regions or to the internet, think data transfer charges as a root cause.

Step 7 – Basic Cost Optimization Strategies

For the Cloud Practitioner exam, focus on simple, high-impact strategies.

1. Right-Sizing

  • Choose instance types and sizes that match actual usage.
  • Avoid over-provisioning (e.g., running an m5.4xlarge when a t3.medium is enough).
  • Tools like AWS Compute Optimizer can recommend better sizes (know the name and purpose).

2. Use Appropriate Storage Tiers

  • Match S3 storage class to access patterns:
  • S3 Standard – frequent access, low latency.
  • S3 Standard-IA / One Zone-IA – infrequent access; cheaper storage, but retrieval and availability trade-offs.
  • S3 Glacier Instant Retrieval / Flexible Retrieval / Deep Archive – archival, very low cost, higher retrieval latency.
  • For EBS, use general purpose (e.g., gp3) unless you need high IOPS (io2).

3. Use Managed Services When It Saves Cost Overall

  • Managed services reduce operational overhead (patching, backups, scaling), which can translate into lower total cost, even if per-unit cost seems higher.
  • Examples:
  • RDS vs. self-managed databases on EC2.
  • AWS Fargate vs. managing your own container cluster on EC2.

4. Turn Off What You Don’t Use

  • Stop or terminate idle EC2 instances, RDS instances, and dev/test environments outside working hours.
  • Use auto scaling to match capacity to demand.

5. Use Discount Models for Predictable Workloads

  • If a workload is steady for 1–3 years, use Reserved Instances or Savings Plans.

These strategies show up frequently in CLF-C02 scenario questions, often phrased as: “How can the company reduce costs while maintaining performance and reliability?”

Step 8 – Quiz: Choosing a Pricing Model

Answer the question based on what you’ve learned about pricing models.

A startup runs a machine learning training job on EC2 that can be paused and resumed. The job runs several times per week and can tolerate interruptions. They want to minimize compute costs. Which pricing model is MOST appropriate?

  1. On-Demand Instances
  2. Reserved Instances
  3. Savings Plans
  4. Spot Instances
Show Answer

Answer: D) Spot Instances

Spot Instances are ideal for **fault-tolerant, flexible workloads** like ML training that can tolerate interruptions. They provide very large discounts compared to On-Demand. Reserved Instances and Savings Plans are better for predictable, always-on workloads, not intermittent, interruptible jobs.

Step 9 – Quiz: Cost Optimization Scenario

Test your understanding of simple cost optimization strategies.

A company stores log files in Amazon S3. The logs are rarely accessed after 30 days but must be retained for 7 years for compliance. What is the MOST cost-effective approach?

  1. Keep all logs in S3 Standard for 7 years.
  2. Move logs older than 30 days to S3 Glacier Deep Archive using lifecycle policies.
  3. Download logs to on-premises storage after 30 days to avoid S3 charges.
  4. Delete all logs after 30 days to avoid storage costs.
Show Answer

Answer: B) Move logs older than 30 days to S3 Glacier Deep Archive using lifecycle policies.

For long-term, rarely accessed data with compliance requirements, **S3 Glacier Deep Archive** is designed to be **very low-cost archival storage**. You can use **S3 Lifecycle policies** to automatically transition objects after 30 days. Keeping everything in S3 Standard is more expensive; deleting logs violates the 7-year retention requirement, and moving to on-premises adds complexity and often higher total cost.

Step 10 – Flashcards: Key Terms Review

Use these flashcards to reinforce key billing and cost optimization concepts.

On-Demand Pricing
A pay-as-you-go model where you pay for compute capacity by the second or hour with no long-term commitments. Highest flexibility, higher cost per unit compared to discounts.
Reserved Instances (RIs)
A pricing model for EC2 where you commit to a specific instance configuration for 1 or 3 years in exchange for a significant discount over On-Demand pricing.
Savings Plans
A flexible pricing model where you commit to a consistent amount of compute spend ($/hour) for 1 or 3 years and receive discounts on eligible compute usage (e.g., EC2, Fargate, Lambda).
Spot Instances
EC2 instances that use spare AWS capacity at steep discounts but can be interrupted by AWS with 2 minutes’ notice. Best for fault-tolerant, flexible workloads.
Right-Sizing
The process of adjusting resource types and sizes (e.g., EC2 instances) to better match actual usage, avoiding over-provisioning and reducing costs.
S3 Storage Classes
Different cost and performance tiers for Amazon S3 objects, such as Standard, Standard-IA, One Zone-IA, and the Glacier family, used to optimize storage cost based on access patterns.
AWS Cost Explorer
A tool in the Billing & Cost Management console that lets you visualize, understand, and analyze your AWS costs and usage over time.
AWS Budgets
A service that allows you to set custom cost and usage budgets and receive alerts when your usage exceeds (or is forecasted to exceed) those budgets.
Data Transfer Out
Data leaving AWS to the internet or between Regions. Typically incurs charges and can be a major contributor to unexpected costs.
AWS Free Tier
A set of limited, promotional usage offers (Always Free, 12 Months Free, and Trials) that let you explore AWS services with reduced or no cost, subject to usage limits and time periods.

Step 11 – Quick Cost Optimization Checklist (Apply to a Scenario)

Imagine you’re reviewing an AWS environment for a small e-commerce startup. They complain that their monthly bill has doubled in the last 3 months.

They use:

  • Several m5.large EC2 instances running 24/7 for web and app tiers.
  • An RDS database running 24/7.
  • An S3 bucket for product images and log files (logs are never deleted).
  • A lot of traffic from their app in eu-west-1 to a reporting system in us-east-1.

Your task: Mentally walk through this 5-point checklist and think of at least one action for each:

  1. Right-size compute
  • Are instances oversized? Could smaller instance types or fewer instances handle the load?
  1. Discount models
  • Are the always-on EC2 and RDS instances using On-Demand only? Could RIs or Savings Plans help?
  1. Storage tiers and lifecycle
  • Are logs in S3 using S3 Standard forever? Could lifecycle policies move older logs to cheaper classes or delete them when no longer needed?
  1. Data transfer patterns
  • Is cross-Region traffic (eu-west-1 ↔ us-east-1) necessary? Could the reporting system move into the same Region to reduce data transfer costs?
  1. Turn off non-production resources
  • Are there dev/test instances running 24/7 that could be shut down outside working hours?

Use this checklist on any exam scenario that mentions unexpectedly high or growing costs.

Key Terms

AWS Budgets
A service that allows you to define cost and usage budgets and receive alerts when thresholds are exceeded or forecasted to be exceeded.
Right-Sizing
Adjusting resource types and sizes (such as EC2 instance families and sizes) to match actual usage, reducing over-provisioning and cost.
AWS Free Tier
Promotional usage offers that allow limited use of certain AWS services at no charge, including Always Free, 12 Months Free, and trial offers.
Savings Plans
A flexible discount model where you commit to a specific amount of compute spend ($/hour) for 1 or 3 years to receive lower prices on eligible compute services.
Spot Instances
Discounted EC2 instances that use spare AWS capacity and can be interrupted by AWS with short notice. Best suited for fault-tolerant, flexible workloads.
S3 Storage Class
A configuration on S3 objects that determines their cost, durability, and access performance (e.g., Standard, Standard-IA, Glacier).
AWS Cost Explorer
An AWS tool that lets you visualize and analyze your historical and forecasted AWS costs and usage.
Data Transfer Out
Data sent from AWS to the internet or between Regions, which typically incurs charges and can significantly affect overall costs.
Reserved Instances
A pricing model where you reserve EC2 capacity for 1 or 3 years in exchange for a significant discount compared to On-Demand.
On-Demand Instances
EC2 instances billed per second or hour with no long-term commitment. Provide maximum flexibility at a higher per-unit cost.
AWS Compute Optimizer
A service that analyzes resource utilization and recommends optimal AWS resources, such as EC2 instance types, to reduce costs and improve performance.
AWS Pricing Calculator
A web-based tool that helps estimate the cost of AWS architectures before deployment.