AWS Learning Journey

Your AWS Bill Is a Design Document: Cost and Performance Optimization

Rightsizing, Compute Savings Plans, Reserved Instances, Spot, S3 storage optimization, NAT gateway and data transfer costs, CloudWatch cost controls, serverless and database tuning, Compute Optimizer, anomaly detection, and FinOps tagging and reporting.

9 min read · 1754 words
AWSFinOpsCloud Cost OptimizationCloud ArchitectureDevOps
Your AWS Bill Is a Design Document: Cost and Performance Optimization cover image

AWS from Zero to Production — Phase 10, Part 4 of 4 · See the full series roadmap


Read an AWS bill carefully, and it tells you how a system was designed.

A huge NAT gateway line says private workloads pull everything through the internet — including S3. Cross-AZ data transfer says chatty services talk across zones. A CloudWatch line bigger than compute says someone logs every request at debug level. On-Demand everywhere says nobody’s committed to anything. And a long tail of tiny charges says resources were created and forgotten.

Cost is an architecture property, like latency or availability. This article shows you how to read the bill, fix the biggest problems first, and build habits that keep costs under control as you grow.

What you’ll walk away with


Start with visibility

You can’t optimize what you can’t see (Phase 1):

Then focus on the top five line items. That’s where most of the money is.


Rightsizing

Most workloads are over-provisioned — sized for a peak that never came, or by guessing.

AWS Compute Optimizer analyzes utilization and recommends better configurations for:

Typical findings: an m5.2xlarge averaging 8% CPU could be an m7g.large; a Fargate task with 2 GB of memory never uses more than 400 MB; a gp2 volume should be gp3.

Order matters: Rightsize first, then commit with Savings Plans. Otherwise, you lock in discounts on capacity you don’t need.

Graviton

Moving to Graviton (Arm) instances — for EC2, Fargate, Lambda, RDS, ElastiCache, and more — often delivers better price-performance with little or no code change. It’s one of the most reliable wins available.


Commitment discounts

Savings Plans

Commit to a consistent amount of compute spend — in dollars per hour — for one or three years:

Reserved Instances

Still the commitment model for several services — like RDS, ElastiCache, OpenSearch, and Redshift provisioned clusters. Check which commitment option each service supports.

How much to commit


Spot Instances

Spare EC2 capacity at up to 90% off, with a two-minute interruption notice (Phase 4):

A typical mix: Savings Plans for the baseline, On-Demand for steady peaks, Spot for everything interruptible.


S3 storage optimization


NAT gateway cost optimization

NAT gateways charge per hour and per GB processed — and they’re a frequent top-five line item.


Data transfer costs

Data transfer is the most misunderstood part of the bill:

Generally free:      data IN from the internet; within the same AZ (private IPs)
Charged:             between AZs (each direction); between Regions;
                     OUT to the internet; through NAT gateways
Often cheaper:       OUT through CloudFront vs. directly from EC2/ALB/S3

Ways to reduce it:


CloudWatch cost controls

From Phase 8:


Serverless cost optimization


Database rightsizing


Cost Anomaly Detection

AWS Cost Anomaly Detection uses machine learning to spot unusual spending — a sudden spike in NAT processing, a forgotten GPU instance, a runaway Lambda loop:

It’s free to use, and it catches what monthly budget alerts find too late.


FinOps: tagging and reporting

FinOps is the practice of bringing financial accountability to cloud spending — engineering, finance, and product working together.

Tagging

A small, enforced tag set:

Project       orders
Environment   prod | staging | dev
Team          platform | data | payments
CostCenter    CC-1042

Reporting

Habits that stick


A prioritized checklist

If you do nothing else, do these — roughly in order of effort vs. impact:

  1. Turn on Cost Anomaly Detection and budgets.
  2. Activate cost allocation tags.
  3. Add S3 and DynamoDB gateway endpoints.
  4. Set log retention everywhere.
  5. Delete idle and orphaned resources.
  6. Rightsize with Compute Optimizer; move to Graviton.
  7. Buy Compute Savings Plans for the baseline.
  8. Use Spot for interruptible work.
  9. Add lifecycle rules and Intelligent-Tiering to S3.
  10. Put CloudFront in front of public traffic.

Common mistakes


Key takeaways


Quick self-check

Test yourself before moving on:

  1. Why rightsize before buying Savings Plans?
  2. What’s the fastest, free way to cut NAT gateway charges for S3 traffic?
  3. Which Savings Plan covers EC2, Fargate, and Lambda?
  4. Total AWS cost rose 30% while orders doubled. Good or bad?

Answers

  1. Otherwise you commit to capacity you don’t need.
  2. An S3 gateway endpoint.
  3. Compute Savings Plans.
  4. Good — cost per order fell. Unit economics tell the real story.

What’s next

Phase 11 brings AI to the platform: machine learning and generative AI fundamentals, then AWS AI services — Amazon Bedrock, SageMaker, and more — ending with a hands-on retrieval-augmented generation (RAG) app.

What’s the biggest cost win your team ever found? Share it in the comments.


Share this article

LinkedIn post draft