AWS Cost Optimisation Strategies Explained: Reduce EC2, Data Transfer and Idle Spend

AWS cost optimisation is the practice of matching resources to real demand, removing idle spend, and choosing the right pricing models so your AWS bill reflects actual usage. Done well, it reduces spend by 40–70% compared to a default first deployment, without sacrificing reliability or performance.

Simple explanation

AWS charges for what you provision and use. The problem is that “what you use” includes resources sitting idle, instances far too large for their actual load, data moving between services and regions, and logs written at full debug verbosity in production.

Cost optimisation comes down to three things:

  • Removing waste. Stop or delete resources that are not earning their cost: idle instances, unattached storage, always-on dev environments, and forgotten snapshots.
  • Matching resources to demand. Use smaller instances when workloads are light, scale automatically when they are not, and switch to event-driven patterns so you pay only for actual work.
  • Choosing better pricing models. Commit to Savings Plans or Reserved Instances for predictable workloads, use Spot for fault-tolerant jobs, and use On-Demand only where flexibility is genuinely needed.

The result is a bill that reflects what your system actually does, not what you feared it might need.

How to think about it

Running a cloud workload without cost optimisation is like leaving every light on in a building 24 hours a day because “someone might need them.” Cost optimisation is walking the building, finding which lights serve no one, and putting the rest on motion sensors. The building still works. The electricity bill drops by half.

How AWS cost optimisation works

Cost optimisation is not a one-time task. It works best as a repeating cycle:

  1. Gain visibility. Use Cost Explorer to see where money is going by service, region, and tag. You cannot optimise what you cannot see.
  2. Identify waste. Find idle instances, unattached EBS volumes, unused load balancers, and forgotten snapshots using Identifying Expensive Resources and Cleaning Up Unused Resources.
  3. Rightsize. Compare instance metrics against instance capacity using Rightsizing Instances and AWS Compute Optimizer recommendations.
  4. Choose the right pricing model. Commit to Savings Plans or Reserved Instances for steady-state workloads once usage patterns are well understood.
  5. Redesign where architecture is the cost driver. Replace polling with event-driven patterns, move background jobs to Lambda, and colocate services to reduce inter-AZ traffic.
  6. Monitor continuously. Set budgets and billing alerts so unexpected spending triggers a notification rather than a surprise at month-end.

When to use this

Cost optimisation is relevant at every stage, but the priorities shift depending on where you are:

  • Early-stage startups. The fastest wins are right-sizing (do not default to m5.xlarge for every service) and scheduling non-production shutdowns. These require no architecture changes and can be done in an afternoon.
  • Growing teams with always-on environments. Development and staging environments running 24/7 are often the largest single source of avoidable spend. Scheduling them to stop outside business hours cuts their compute cost by 65%+ with no impact on developer productivity.
  • Production systems with predictable baseline usage. Once a workload’s resource requirements are stable and well understood, switching from On-Demand to Savings Plans or Reserved Instances provides a 20–60% discount with no change to the workload itself.
  • Event-driven or bursty workloads. If your system has long idle periods between bursts of activity, a polling-based architecture wastes most of its compute budget on doing nothing. Event-driven patterns eliminate that idle cost entirely.
  • Teams seeing unexplained networking, logging, or storage costs. Inter-AZ traffic, NAT Gateway data processing, CloudWatch Logs ingestion, and unmanaged EBS snapshots are the usual culprits when costs feel higher than expected.

Highest-impact AWS cost optimisation strategies

Right-size compute, storage, and databases

Right-sizing means choosing the smallest resource that meets your actual performance requirements, not what you might need under worst-case conditions.

The common objection is “I don’t want to run out of capacity.” The answer is to design for elasticity rather than permanent over-provisioning:

  • Deploy a t3.medium, apply realistic load, and watch CPU and memory in CloudWatch
  • If utilisation runs consistently above 70–80%, size up or add Auto Scaling
  • If utilisation is consistently low, downsize. The difference between an m5.xlarge and a t3.medium is roughly $110/month per instance
T-series burstable instances

A t3.medium earns CPU credits when running below its baseline and spends them during spikes. For web servers with moderate, variable traffic, a t3 at roughly $30/month often handles the same load as an m5 at $140/month. Check the CPU credit balance metric in CloudWatch to confirm credits are not being depleted consistently before committing to t3 for a production workload.

For a deeper look at EC2 rightsizing options and storage volumes, see EC2 Cost Optimisation and Rightsizing Instances.

Stop, schedule, or delete idle resources

Idle resources are the most straightforward source of waste. Common examples:

  • Development and staging environments running overnight and at weekends when nobody is using them
  • EC2 instances that are stopped but have EBS volumes still attached (EBS charges persist even when the instance is off)
  • Unattached Elastic IPs (charged at a flat rate when not associated with a running instance)
  • Old snapshots and AMIs kept indefinitely with no retention policy
  • Load balancers provisioned for a project that was cancelled

Development and staging environments deserve specific attention. If they run only during business hours (roughly 8 hours/day, 5 days/week), they are active for about 40 of 168 hours per week, or about 24% of the time. Scheduling them to shut down outside those hours cuts their compute cost by 76%. AWS Systems Manager, Lambda scheduled events, and AWS Instance Scheduler can all automate this without manual effort.

See Cleaning Up Unused Resources for a practical checklist of what to look for and how to remove it safely.

Choose the right pricing model

The four EC2 pricing models serve different workload types. Using the wrong model for a workload type is one of the most common sources of unnecessary AWS spend. See the full comparison table below for a side-by-side breakdown.

For predictable workloads that run continuously, Savings Plans and Reserved Instances provide meaningful discounts over On-Demand. For fault-tolerant workloads with flexible timing, Spot Instances for Cost Savings can reduce costs by up to 90%. See AWS Pricing Models for a full explanation of how each model works and when to buy it.

Do not commit before you have data

Reserved Instances lock you into a specific instance type, region, and OS. Committing before you understand your actual usage patterns means paying for a discount that may not match your real workload. Use On-Demand for at least 30–60 days on any new workload, measure the actual utilisation, and then evaluate Savings Plans first for their greater flexibility before considering Reserved Instances.

Prefer event-driven, serverless, and managed services where they reduce total cost

Event-driven over polling

Polling repeatedly checks for new data and wastes compute on doing nothing. An EC2 instance checking an S3 bucket every 10 seconds runs 24/7 and makes 8,640 API calls per day, even when there is nothing to process.

Replacing it with a Lambda function triggered by S3 event notifications means:

  • Zero compute cost when no files arrive
  • Execution within milliseconds of a file landing
  • You pay for actual invocation duration, not idle time

The same logic applies to SQS, DynamoDB Streams, and EventBridge. See Event-Driven Systems in AWS for patterns and worked examples.

For a worked comparison of when Lambda, ECS, and EC2 each make sense financially, see Choosing Between Lambda, ECS and EC2.

Managed services vs self-managed

A common instinct is to self-manage infrastructure to save money: “RDS is expensive, I’ll run MySQL on EC2.” This reasoning usually fails when you include the full cost:

  • An EC2 instance comparable in size to RDS, before any operational extras
  • A second EC2 instance for high availability standby
  • Engineering time to configure replication, backups, patching, and monitoring
  • On-call responsibility when the database fails at 3am

RDS Multi-AZ includes the standby, automated backups, minor version patching, and built-in metrics. The RDS premium pays for that operational overhead. For most teams, managed services cost less in total once engineering time is counted.

For Lambda-specific cost management, see Lambda Cost Optimisation.

Reduce data transfer, NAT, and logging costs

Data transfer is the most commonly underestimated cost category. The pricing model is asymmetric and non-obvious:

  • Into AWS (ingress): Generally free
  • Out to the internet (egress): Charged per GB. See Network Egress Costs for current reference rates and reduction techniques
  • Between regions: Charged per GB
  • Between Availability Zones in the same region: Charged each way
  • Within the same AZ: Free
The inter-AZ charge catches architects off guard

If your application servers in AZ-a are constantly communicating with a database in AZ-b, you pay for that traffic in both directions. At high volume (say, 10 TB/month of database traffic), that is a meaningful line item that does not appear under compute or database billing. It appears under “Data Transfer” and is easy to overlook unless you are specifically looking for it.

NAT Gateway charges on two dimensions: an hourly rate plus a per-GB data processing charge. Applications that route frequent external API calls through a NAT Gateway accumulate data charges quickly. For AWS services specifically (S3, DynamoDB, and others), use VPC endpoints to bypass the NAT Gateway entirely and eliminate that per-GB cost.

CloudWatch Logs ingestion and storage also compounds at scale. Debug-level logging in production generating gigabytes per day adds up. Set log levels appropriately and configure log retention policies to expire old logs automatically rather than retaining them indefinitely.

For S3 storage cost control, including storage class selection and lifecycle policies, see S3 Cost Optimisation.

Use AWS cost tools before guessing

Before making changes, use AWS’s own tooling to identify where the money is actually going:

  • Cost Explorer shows spend broken down by service, region, linked account, and resource tag. It is the starting point for any cost investigation. See Cost Explorer Reports.
  • AWS Compute Optimizer analyses CloudWatch metrics and recommends downsized or differently configured instances for EC2, RDS, Lambda, and EBS. It shows what resources are over-provisioned based on actual usage history.
  • Trusted Advisor flags idle load balancers, underutilised instances, and unattached EBS volumes. Available for basic checks without a support plan upgrade.
  • Cost Anomaly Detection monitors spend patterns and alerts when a service’s cost deviates significantly from its baseline. It catches runaway costs before month-end.

Set budgets and billing alerts so you are notified when spending exceeds a threshold. A budget alert that fires at 80% of your monthly target costs nothing and prevents surprises.

Savings Plans vs Reserved Instances vs Spot vs On-Demand

Pricing modelBest forFlexibilityCommitmentInterruption riskTypical trade-off
On-DemandVariable loads, experiments, new workloadsFull: start and stop anytimeNoneNoneHighest unit cost; maximum flexibility
Compute Savings PlansSteady compute spend with evolving instance types or regionsHigh: applies across families, sizes, and regions1 or 3 year hourly spend commitmentNone20–66% discount; stays useful even as architecture evolves
Reserved InstancesIdentical, predictable workloads running 24/7Low: locked to instance type, region, and OS1 or 3 year specific configurationNone30–60% discount; discount is lost if the configuration changes
Spot InstancesFault-tolerant batch, CI/CD agents, ML trainingMedium: same instance types as On-DemandNoneHigh: 2-minute interruption warning60–90% discount; requires interruption handling in the workload

For most production workloads, Compute Savings Plans are the default best choice for committed spend. They give meaningful discounts while remaining flexible as architectures evolve. Reserve Reserved Instances for workloads you are confident will run in the same configuration for years. Use Spot only for workloads specifically built to handle interruption (the build can restart, the batch job retries from a checkpoint). Use On-Demand for anything new or variable until you have enough usage data to commit confidently.

See AWS Pricing Models for a fuller explanation of each model’s mechanics and the purchase process.

What this looks like in practice

A two-person startup launches on AWS, moving fast. Every service runs on m5.xlarge instances: the web app, background worker, bastion host, staging environment, and development environment. All On-Demand, all running 24/7.

Six months later the bill is $3,200/month for roughly 200 users.

The audit reveals:

  • The web app server averages 4% CPU utilisation. An m5.xlarge has 4 vCPUs and 16 GB RAM, massively oversized for this load.
  • The development environment runs overnight and at weekends when nobody is using it.
  • The staging environment gets used for a few hours per week at most.
  • The background worker does 15 minutes of work per hour and sits idle the other 45.

Fixes applied:

  • Web server downsized to t3.medium (roughly $30/month On-Demand), more than enough for 200 users with room to grow
  • Dev and staging put on scheduled shutdowns outside business hours
  • Background worker replaced with Lambda, paying only for the 15 minutes of execution time per hour, not the 45 minutes of idle time

Monthly bill: $3,200 down to under $400.

None of these changes required a full architectural redesign. They required measuring what was actually happening and acting on it.

The most expensive mistake: treating defaults as baselines

Most cost problems start the same way: someone picks an instance type, it works, and nobody revisits it. Months later the bill is high but the cause is invisible because the service is running fine. Set a calendar reminder to review CPU and memory utilisation every 30 days for the first 6 months of a new workload. That habit alone prevents the scenario above.

Common mistakes

  1. Running development environments 24/7. Development and staging environments typically need to run only during business hours. Scheduling them to stop outside those hours cuts their compute cost by 65–76% with no impact on developer productivity. AWS Systems Manager and Lambda scheduled events can automate this completely.
  2. Using m5 where t3 works fine. T3 burstable instances are significantly cheaper than m5 general-purpose instances. If CPU usage stays below the t3 baseline most of the time (which is true for most web servers at moderate traffic), t3 is both cheaper and adequate. Check CPU credit balance in CloudWatch to confirm credits are not being depleted.
  3. Ignoring NAT Gateway data costs. NAT Gateway charges an hourly rate plus a per-GB data processing charge. Applications that route frequent calls to external APIs from private subnets accumulate data charges quickly. Use VPC endpoints for AWS services (S3, DynamoDB) to bypass the NAT Gateway entirely for those calls.
  4. Over-logging to CloudWatch Logs. CloudWatch Logs charges for ingestion and storage. Debug-level logging in production generating gigabytes per day adds up quickly. Set log levels appropriately in production and configure log retention policies to expire old logs automatically.
  5. Committing to Reserved Instances before understanding usage patterns. Reserved Instances give good discounts but lock you into a specific configuration. Committing before you know what instance types and regions you will actually use long-term results in a discount that does not match your actual workload. Use On-Demand until usage patterns are stable, then evaluate Savings Plans first for their greater flexibility.

Quick checklist

Use this as a starting point for a cost audit:

  • Open Cost Explorer and identify your top three cost drivers by service
  • Check Identifying Expensive Resources and Compute Optimizer for rightsizing recommendations
  • Find and delete idle resources: unattached EBS volumes, unused Elastic IPs, forgotten load balancers, old snapshots
  • Schedule non-production environments to shut down outside business hours
  • Review rightsizing opportunities for instances with consistently low CPU utilisation
  • Evaluate Savings Plans for any steady-state compute spend over $200/month
  • Check whether Spot Instances are viable for batch jobs or CI/CD build agents
  • Inspect NAT Gateway data charges and assess whether VPC endpoints would reduce them
  • Review network egress costs and look for inter-AZ traffic and unexpected internet egress
  • Check CloudWatch Logs retention policies and log verbosity in production
  • Set a billing alert for 80% and 100% of your monthly budget target
  • Schedule a monthly cost review. Costs drift upward quietly without regular attention.

Summary

  • Most cost problems are architecture problems: oversized instances, always-on environments, polling instead of events, and invisible data transfer charges are the main culprits.
  • Right-size from the start: deploy small, measure utilisation in CloudWatch, and use Auto Scaling for elasticity instead of permanent oversizing.
  • Use On-Demand for variable workloads and experiments. Use Savings Plans or Reserved Instances for steady 24/7 workloads. Use Spot for fault-tolerant batch jobs.
  • Event-driven architectures eliminate idle compute. A Lambda function triggered by events costs nothing when nothing is happening.
  • Data transfer, NAT Gateway, and CloudWatch Logs costs are real and often overlooked. Audit them explicitly, not just compute.
  • Use Cost Explorer, Compute Optimizer, and Trusted Advisor before making changes. Find where the money is actually going first.

Frequently asked questions

What is AWS cost optimisation?

AWS cost optimisation is the practice of reducing your AWS bill by removing waste, matching resources to actual demand, and choosing the right pricing models and architecture patterns. The goal is lower spend without hurting reliability or performance. Most AWS cost problems trace back to a small set of causes: oversized instances, always-on environments that should be idle, polling architectures that waste compute, and overlooked data transfer charges.

What is the fastest way to reduce AWS spend?

The fastest wins are usually: stop or schedule non-production environments to shut down outside business hours (saves 65%+ on those resources), right-size obviously oversized instances based on CloudWatch CPU and memory metrics, and delete unused resources such as unattached EBS volumes, idle load balancers, and forgotten snapshots. These require no architecture changes and can reduce a bill significantly in a single afternoon.

Savings Plans vs Reserved Instances: which should I choose?

For most teams, Compute Savings Plans are the better default. They apply across instance families, sizes, and regions, so they remain useful even as your architecture evolves. Reserved Instances give a slightly higher discount for identical configurations, but lock you into a specific instance type and region. Choose Reserved Instances when you are confident a workload will run unchanged for one or three years. Choose Savings Plans when you want discount coverage with more flexibility.

What AWS costs do beginners usually miss?

Data transfer is the most commonly missed cost category. Moving data out of AWS to the internet is charged per GB. Traffic between Availability Zones in the same region costs money each way. NAT Gateway charges for both uptime and data processed. CloudWatch Logs ingestion and storage at high volume adds up quickly. Unattached EBS volumes, idle Elastic IPs, and forgotten load balancers also accumulate cost silently. These line items do not appear under compute, so they are easy to overlook.

Which AWS tools should I check first to find waste?

Start with AWS Cost Explorer to see where spend is concentrated by service, region, and resource tag. Then check AWS Compute Optimizer for rightsizing recommendations on EC2, RDS, and Lambda. Trusted Advisor flags idle resources and underutilised instances at no extra cost for basic checks. Finally, use Cost Explorer cost anomaly detection to catch unexpected spending spikes before they compound into a large bill.

Last verified: 19 March 2026 Cloud services change frequently. Verify details against official documentation before making infrastructure decisions.