← Back to blog

Optimizing AWS costs: capacity, networking and storage

Lazy Read

Check each resource’s purpose before reducing capacity. Billing and metrics reveal candidates, but decisions need owners and service requirements.

  • Purpose: Identify owners and dependencies.
  • Evidence: Use representative metrics and costs.
  • Validation: Review risk and measure the change.

An instance enlarged for a campaign, a NAT Gateway processing avoidable traffic, or volumes that outlive their servers. Each decision may have been reasonable. The problem appears when infrastructure keeps paying for a requirement that has changed.

After reviewing Google Cloud and Azure, it is AWS’s turn. The question remains: which capacity delivers value, and what can we adjust while preserving performance, availability and security? Savings depend on the starting point; no percentage applies universally.

Understand the bill and its boundaries

Start with Cost Explorer, comparing equivalent periods by service, account and region. Owner, product and environment tags help allocate costs, but a missing tag does not prove a resource is unnecessary.

Distinguish unblended, amortized and net costs. An upfront purchase and its allocation over a commitment tell different stories. Do not simply add sizing savings and a reservation discount against the same capacity.

In Organizations, check which accounts a query includes: the management account can access member-account spending. A LINKED_ACCOUNT filter scopes the analysis. Pagination or denied access must be reported as incomplete coverage.

Size for the actual workload

For EC2, review average and maximum CPU, memory, I/O, queues and latency over a representative period. Memory generally requires an agent or other instrumentation; CPU does not reveal it. An almost idle machine may host a short but critical job.

Compare permanent capacity with moving that job to AWS Batch, ECS/Fargate or a temporary worker. Include startup, execution, networking, retries and operations. Scaling may be appropriate, but it can also multiply capacity when a short intensive task shares resources with an API.

Compute Optimizer recommendations support investigation. They do not replace understanding resource purpose, business requirements or testing a change. Enabling a previously inactive service requires a separate decision.

Review networking while preserving controls

NAT Gateway can charge for availability and processed data. Check routes and destinations. For S3 or DynamoDB traffic, consider gateway endpoints; for other services, calculate whether interface endpoints justify their own costs.

Review availability zones, inter-region transfers, load balancers and public addresses. Do not remove a gateway merely because it handles little traffic: it may support recovery, connectivity or isolation. Simplification must retain required flows and controls.

Store according to recovery and retention needs

An unattached EBS volume is a review candidate, not a deletion instruction. Check ownership, snapshots, retention and restoration. The same applies to old AMIs, backups and logs.

Choose S3 storage classes according to access frequency, retrieval latency, minimum duration, requests and object size. Glacier Instant Retrieval, Flexible Retrieval and Deep Archive behave differently. Lower storage pricing can become expensive when data needs frequent retrieval.

Commitments, caching and platform choices

Right-size consumption before considering Savings Plans or Reserved Instances for its stable portion. Evaluate coverage, utilization, duration and expected changes. Spot fits work that tolerates interruptions and has appropriate recovery.

Before adding replicas, review cacheable content, CloudFront and redundant calls. Caching must respect authentication and private data; measure hits, consistency, invalidation and avoided origin load. Redis and container platforms also add operational costs: each component should justify its purpose.

A small API may fit a VM, containers or a managed service according to its requirements. Compare total costs, including patching, backups, availability and team time. No platform wins for every workload.

A skill to organize the audit

The optimice-aws 0.1.0 skill helps an agent structure queries and proposals. It includes a preliminary metadata, cost and CPU collector with explicit account and regions, read-only access and private local output.

The default plan makes no AWS calls. Collection requires authorization and may incur API charges. The collector verifies the account, filters billing, bounds responses and reports pagination and missing data. It does not change infrastructure, purchase reservations or read S3 objects. It does not cover every service: snapshots, container workloads, memory and dependencies need additional review.

For each proposal, record evidence, ownership, estimated net savings, risk, reversibility and before/after metrics. The useful outcome is a verifiable decision that lowers unit cost while preserving service requirements.