AWS cost optimization works best in a fixed order: delete what nobody uses, resize what is oversized, move what you can to cheaper hardware such as Graviton, and only then buy Savings Plans for the steady usage that is left. The order matters because a Savings Plan locks in an hourly spend for one or three years, so buying it first means paying a discounted rate on waste for the whole term. Once compute is in shape, the next money is usually in storage classes, network charges and a few line items that appear without anyone deploying anything.
Unless a section names another region, prices here are AWS list prices for Linux in US East (N. Virginia), taken from AWS's price list as published on 15 October 2026. Your region and discounts will change the numbers, but rarely the order.
Read the bill and set guardrails first
Open Cost Explorer, group the last three months by service, then switch the grouping to usage type. Usage type is where the bill becomes readable: BoxUsage:m7i.2xlarge is instance hours, NatGateway-Bytes is traffic through a NAT gateway, DataTransfer-Regional-Bytes is mostly traffic between Availability Zones and TimedStorage-ByteHrs is S3 storage. Outside us-east-1 each one carries a region prefix, such as EUC1- for Frankfurt. Sort by cost and write down the top ten lines. They are usually most of the bill, and they tell you which of the sections below to read first.
Before changing anything, put two guardrails in place, so that a mistake made during the cleanup shows up within days instead of on next month's invoice:
- An AWS Budgets alert on forecast monthly spend. Monitoring and notifications cost nothing; only action-enabled budgets beyond the first two are charged.
- A Cost Anomaly Detection monitor that emails you, or posts to a chat channel through SNS, when a service's spend jumps.
Then make the data good enough to act on. Opt in to Compute Optimizer and Cost Optimization Hub, and install the CloudWatch agent on your instances so memory is measured too. EC2 doesn't report memory by itself, so without the agent (or memory metrics imported from a supported observability tool) the rightsizing advice is based on CPU alone. Tag resources with at least an owner, an environment and a project, and activate those keys as cost allocation tags in the Billing console. AWS can backfill tag activation up to 12 months, but only for resources that already carried the tag, so tag now even if you analyse later. Tags are far easier to keep consistent when they are set in your Terraform modules than by hand.
Delete what nobody uses
This step has no trade-off, so it goes first. The usual finds:
- EBS volumes in the
availablestate, left behind when an instance was terminated, and snapshots nobody has restored in a year. - Load balancers with no healthy targets, and whole test environments that outlived their project.
- NAT gateways in VPCs that nothing uses anymore. Each costs $0.045 an hour, about $33 a month, before it processes a single byte (VPC pricing).
- Public IPv4 addresses. Since February 2024 every public IPv4 address costs $0.005 an hour, about $3.65 a month, whether it is attached or idle. One address is pocket change; one on every instance in a large fleet is a real line.
- CloudWatch log groups that never expire, which is the default. Ingestion costs $0.50 per GB and stored logs keep piling up, so give every group a retention period. Logs you keep only for audits or rare debugging can go to a log group created in the Infrequent Access class, which ingests at $0.25 per GB but has no metric or subscription filters; a group's class can't be changed later.
A short AWS CLI loop finds most of these in every region enabled in the account:
for region in $(aws ec2 describe-regions --region us-east-1 \
--query 'Regions[].RegionName' --output text); do
echo "== $region"
# EBS volumes not attached to any instance
aws ec2 describe-volumes --region "$region" --filters Name=status,Values=available \
--query 'Volumes[].[VolumeId,Size,VolumeType,CreateTime]' --output text
# Elastic IPs not associated with an instance or network interface
aws ec2 describe-addresses --region "$region" \
--query 'Addresses[?AssociationId==null].[PublicIp,AllocationId]' --output text
# Log groups with no retention period, kept forever
aws logs describe-log-groups --region "$region" \
--query 'logGroups[?retentionInDays==null].[logGroupName,storedBytes]' --output text
doneThe --region on the first call is there only because describe-regions needs a region to talk to; it still returns every region enabled in the account. The loop checks all of them on purpose, since forgotten resources tend to live in the region nobody opens.
Rightsize on memory as well as CPU
Compute Optimizer analyses 14 days of metrics by default, which can miss a month-end batch run. Switch the lookback to 32 days in its rightsizing preferences; that costs nothing. For seasonal peaks, either check each recommendation against your own busiest week or turn on the paid enhanced infrastructure metrics, which extend the lookback to 93 days for about $0.25 per instance per month.
Here is what rightsizing and the next two steps do to one server running all month (730 hours), assuming its peak CPU and memory fit in half the size and the application runs on Arm:
Step | Instance | Per hour | Per month |
|---|---|---|---|
Starting point | m7i.2xlarge (8 vCPU, 32 GiB) | $0.4032 | $294.34 |
Rightsized | m7i.xlarge (4 vCPU, 16 GiB) | $0.2016 | $147.17 |
Moved to Graviton | m7g.xlarge (4 vCPU, 16 GiB) | $0.1632 | $119.14 |
Plus a 1-year Compute Savings Plan, no upfront | m7g.xlarge | $0.1199 | $87.53 |
That is about 70% less for the same work, and the order of the steps is what gets you there. Had the Savings Plan been bought on day one, the commitment would have been sized for the $294 server and kept billing at that level after the server shrank.
One detail surprises people: newer Intel generations are not cheaper per hour. An m6i.xlarge is $0.192 and an m7i.xlarge $0.2016 (EC2 On-Demand pricing). A generation upgrade buys speed, and it only saves money if that speed lets you drop a size.
Move to Graviton where your code allows
In the same price list, the Arm-based m7g.xlarge costs 19% less per hour than the Intel m7i.xlarge with the same vCPUs and memory, and the Graviton4 m8g.xlarge ($0.17952) is 15% below its Intel counterpart, the m8i.xlarge ($0.21168). Lambda bills arm64 duration at $0.0000133334 per GB-second against $0.0000166667 on x86, exactly 20% less.
How much work the move takes depends on what you run. Managed databases and caches such as RDS and ElastiCache offer Graviton instance classes, and switching is an instance class change: a short restart, no code change. For your own services, code in Python, Node.js, Java or Go usually runs unchanged on Arm. The work is in native dependencies and in container images, which have to be built for linux/arm64; Docker's buildx can build both architectures in one step. Fargate and Lambda both run on Arm, and a Lambda package only needs rebuilding if it bundles native libraries. Move one service, compare latency and error rates for a week, then do the rest.
Commit to the baseline that is left
Once the fleet is the right size, buy commitments for the part that runs around the clock. AWS's Savings Plans documentation lists the options:
- Compute Savings Plans: up to 66% off, applied to EC2 in any instance family and region, and to Fargate and Lambda.
- EC2 Instance Savings Plans: up to 72% off, tied to one instance family in one region.
- Database Savings Plans: up to 35% off across RDS, Aurora, DynamoDB, ElastiCache and several other database services, one-year term only, on recent instance generations. They can't be stacked with RDS Reserved Instances on the same workload.
Those percentages are maximums. For the m7g.xlarge above, a Compute Savings Plan in us-east-1 gives 26.5% off for one year with no upfront payment, 31.4% for one year paid upfront, 49.3% for three years with no upfront and 54.0% for three years paid upfront.
Which plan fits depends on how you run compute. Oplist, a client we build for, runs on ECS Fargate and Lambda. For a setup like that, Compute Savings Plans are the only commitment that covers the compute at all; EC2 Instance Savings Plans and Reserved Instances apply to EC2 only.
To size the commitment, look at hourly usage over the last 30 to 60 days and commit to the floor, the level you never drop below. A commitment sized to the average goes partly unused in the quiet hours, and unused commitment is still billed. Cost Explorer's purchase recommendations do this arithmetic over a 7, 30 or 60-day lookback. They look backwards, so right after a rightsizing pass a 30 or 60-day window still contains the old, larger instances; use the 7-day window, or wait until the longer one only covers the new sizes. Buy in slices, say a third now and more next month, so a wrong guess stays small. A Savings Plan with an hourly commitment of $100 or less can be returned within seven days of purchase, as long as it is still the same calendar month.
Our view on terms: one year with no upfront payment is the sensible default while a product's architecture is still changing. Three years nearly doubles the discount (49.3% against 26.5% for the m7g.xlarge), but take it only for workloads you are confident will still run in much the same shape in 2029. After a redesign you keep paying for the old capacity until the term ends.
Put interruptible work on Spot
Spot Instances run on spare EC2 capacity at up to 90% off On-Demand prices, and AWS can reclaim them with a two-minute warning. They suit CI runners, batch and data jobs that checkpoint their progress, and stateless web or worker tiers in an Auto Scaling group that mixes Spot with On-Demand. They don't suit a single database server or a long job that loses everything when it stops.
Two habits make Spot dull in a good way. Allow many instance types and sizes, and use the price-capacity-optimized allocation strategy so AWS picks pools that are less likely to be interrupted. And handle the interruption notice by draining work instead of hoping it never comes. On EKS, Karpenter handles both (our Docker and Kubernetes post covers cluster basics), and on ECS, Fargate Spot offers the same deal for containers.
Switch off non-production outside working hours
A development environment used 12 hours a day on weekdays needs 60 of the week's 168 hours, so stopping it the rest of the time cuts its instance hours by about 64%. The Instance Scheduler on AWS solution, or a pair of EventBridge Scheduler rules, can stop and start EC2 and RDS on a timetable.
Know what keeps billing while things are stopped: EBS volumes, snapshots and public IPv4 addresses still cost money. And an RDS instance can stay stopped for at most seven consecutive days before AWS starts it again, so a test database you park for a month needs a job that stops it again after each restart.
Storage: S3 classes and EBS volume types
S3 lifecycle rules move objects by age, counted from when each object was created. If you know your data goes cold after a month, a rule to Standard-IA at 30 days and Glacier Instant Retrieval at 90 is simple and cheap. If you don't know the access pattern, S3 Intelligent-Tiering moves objects by actual access (to the Infrequent Access tier after 30 days without a read, to Archive Instant Access after 90), with no retrieval fees and a small monitoring charge per object.
Read the small print on storage classes before moving millions of small files. Standard-IA and Glacier Instant Retrieval bill each object as at least 128 KB and have minimum storage durations of 30 and 90 days (Deep Archive's is 180), and every lifecycle transition is charged as a request per object. Since September 2024, new or edited lifecycle rules skip objects under 128 KB by default, so a bucket of thumbnails mostly stays where it is. The costly cases now are a rule that overrides that size filter, an older rule that still sends small objects to the Glacier archive classes, and an application that uploads small files straight into an IA class. Intelligent-Tiering doesn't monitor or move objects under 128 KB either. Two cheaper wins exist in almost every account: a rule that aborts incomplete multipart uploads after a few days, and one that expires old noncurrent versions in versioned buckets.
For EBS, gp3 costs $0.08 per GB-month in us-east-1 against $0.10 for gp2, which is 20% less, and every gp3 volume includes 3,000 IOPS and 125 MB/s regardless of size (EBS pricing). You can change the type in place while the volume stays attached. The catch is large gp2 volumes: gp2 gives 3 IOPS per GiB, so a 2,000 GiB volume has 6,000 baseline IOPS and up to 250 MB/s. Provision the same on gp3, at $0.005 per extra IOPS-month and $0.04 per extra MB/s-month, and that volume goes from $200 to about $180 a month. Still cheaper, but do the sum before converting in bulk.
Network charges that hide in the bill
NAT gateways charge twice: $0.045 per hour, and another $0.045 for every GB they process. Traffic from private subnets to S3 and DynamoDB doesn't need to pass through them, because gateway VPC endpoints for those two services have no hourly or data charge. Container images are a common case: ECR serves image layers from S3, so an S3 gateway endpoint takes most image-pull traffic off the NAT gateway. For other AWS APIs called heavily from private subnets, interface endpoints cost $0.01 per hour in each Availability Zone plus $0.01 per GB, which beats NAT processing once the volume is high.
Traffic between Availability Zones costs $0.01 per GB in each direction. Production should still span zones, so look for chatty paths: a service in one zone calling a cache or database in another thousands of times a second, or replication traffic nobody planned for. For the wider picture of a multi-zone setup, see our AWS architecture guide.
Traffic to the internet: the first 100 GB a month is free across AWS, then the next 10 TB from us-east-1 costs $0.09 per GB. Transfer from an AWS origin to CloudFront carries no data transfer charge, so serving downloads and static files through CloudFront moves that traffic onto CloudFront's own pricing and takes load off the origin.
Line items that appear on their own
Some charges arrive without a deployment:
- RDS Extended Support. RDS for MySQL 8.0 reached the end of standard support on 31 July 2026, and every instance still on it has paid Extended Support since 1 August (RDS for MySQL versions). AWS's US East pricing examples put it at $0.100 per vCPU-hour for the first two years and $0.200 from year three, so a 4-vCPU instance adds about $292 a month, and a Multi-AZ deployment pays it for the standby as well. Upgrading to MySQL 8.4 removes it, and old PostgreSQL major versions work the same way.
- EKS extended support. A cluster on a Kubernetes version past standard support costs $0.60 an hour instead of $0.10, about $438 a month instead of $73 (EKS pricing).
The same levers on Azure and Google Cloud
If part of your estate runs elsewhere, the ideas carry over under different names:
Lever | AWS | Azure | Google Cloud |
|---|---|---|---|
Commitment discounts | Savings Plans, Reserved Instances | Savings plan for compute, Reservations | Committed use discounts (sustained use discounts apply automatically) |
Spare capacity | Spot Instances | Spot Virtual Machines | Spot VMs |
Rightsizing advice | Compute Optimizer | Azure Advisor | Recommender |
Arm processors | Graviton | Cobalt 100 | Axion |
Storage tiering | S3 lifecycle rules, Intelligent-Tiering | Blob access tiers with lifecycle management | Object Lifecycle Management, Autoclass |
What we wouldn't spend time on
- Paying a third-party platform a share of the savings while your bill is a few thousand dollars a month. At that size the native tools above find most of the money. Those platforms start to pay off when managing commitments across many accounts becomes someone's full-time job.
- Moving regions only for price. Frankfurt costs about 20% more than N. Virginia for the m7i.xlarge above, but latency to your users and data-residency rules usually decide the region, and a move has its own cost.
- Rewriting a service for serverless purely to save money. It is often cheaper at low or spiky load and more expensive at steady high load, so do it when the architecture improves too.
- Tuning a $5 line while the top ten are untouched.
Frequently asked questions
Savings Plans or Reserved Instances?
For EC2, Fargate and Lambda, Savings Plans: the discounts are comparable, there is less to manage, and Compute Savings Plans follow you across instance families and regions. For databases, compare the Database Savings Plan rate with the Reserved Instance rate for your exact instance class before buying, because you can't combine the two on one workload. Services no Savings Plan covers, such as Redshift, still use reservations.
Do Savings Plans apply across all our AWS accounts?
If the accounts are in one AWS Organization and discount sharing is turned on in the billing preferences, yes. A plan covers the usage of the account that bought it first, then usage in the other accounts. The recommendations work the same way: in the management account they consider usage across every account with sharing on, while a member account only sees recommendations for its own usage. Size the floor across all the accounts the plan will actually cover.
How much can we expect to save?
It depends on where you start, and we haven't seen an industry average we trust enough to quote. An account that has never been cleaned up and runs everything On-Demand has the most room, as the oversized-server example shows. An account that already uses Savings Plans and right-sized instances will find smaller amounts, mostly in storage and network.
If you want the team that maintains your product to keep an eye on its AWS account too, our maintenance and support page describes how we work.
Related Articles
AWS Cloud Architecture: A Practical Blueprint and What It Costs
The AWS setup we would suggest for most web apps and SaaS products, layer by layer: accounts, network, compute, data and operations, with October 2026 prices for Frankfurt.
Read More: AWS Cloud Architecture: A Practical Blueprint and What It CostsCloud Migration Strategy: How to Pick the Right R for Each App
Choose one of the 7 Rs per application, map what each system talks to, move in waves, rehearse the rollback and budget for the costs most migration plans leave out.
Read More: Cloud Migration Strategy: How to Pick the Right R for Each AppDocker Compose vs Kubernetes: When One Server Stops Being Enough
Docker Compose runs a multi-container app on one machine; Kubernetes runs it across many. How to tell which you need and what Kubernetes really costs.
Read More: Docker Compose vs Kubernetes: When One Server Stops Being Enough
