Skip to content

Design Cost-Optimized Storage Solutions

Step 21 of 28

AWS Storage Cost Optimization: S3 Lifecycle, EBS and EFS

Where this lesson fits

This lesson covers Domain 4: Design Cost-Optimized Architectures, Task 4.1: Design cost-optimized storage solutions. Domain 4 carries 20% of the scored content of SAA-C03, and AWS storage cost optimization requires evaluating capacity, requests, retrieval and retention together. The questions describe data with an access pattern (hot for a month, then rarely read; unpredictable; written once and kept for seven years), a retrieval expectation (milliseconds, minutes, or hours), and a constraint (minimum cost, no application changes, regulatory retention). Your job is to pick the cheapest design that still meets every stated requirement.

Review S3, EFS and EBS performance and access models before comparing their costs. Here the question changes from "which storage performs best?" to "which storage tier, volume type, and lifecycle policy costs least while still satisfying the requirement?"

Learning objectives

After this lesson you will be able to:

  • Choose the correct Amazon S3 storage class from an access pattern, retrieval time, and durability or availability requirement.
  • Write S3 Lifecycle rules that transition and expire objects, and explain minimum storage duration and minimum object size charges.
  • Use S3 Intelligent-Tiering when access patterns are unknown, and explain what it does and does not charge for.
  • Select Amazon EBS volume types (gp3, io2, st1, sc1) by cost and workload, and remove wasted EBS spend (unattached volumes, old snapshots).
  • Choose among Amazon EFS storage classes and Amazon FSx file systems for cost.
  • Use AWS Backup, S3 Object Lock, and retention policies without paying for data you do not need.
  • Choose a cost-efficient migration path for large datasets (DataSync, Snow family, Storage Gateway).
  • Right-size storage using metrics (S3 Storage Lens, Storage Class Analysis, CloudWatch, Cost Explorer).

1. How storage cost is built

Every storage bill is a sum of several dimensions. Exam answers hinge on noticing which dimension dominates.

Dimension Examples Typical lever
Capacity (GB-month) S3 storage, EBS provisioned size, EFS stored data Lower-cost tier, delete unneeded data
Requests S3 PUT/GET, LIST, lifecycle transitions Fewer, larger objects; avoid transitioning millions of tiny objects
Retrieval Glacier retrievals, Standard-IA and One Zone-IA retrieval fee Do not put frequently read data in an archive tier
Data transfer Internet egress, cross-Region replication, cross-AZ Keep consumers in the same Region; use CloudFront
Provisioned performance EBS IOPS and throughput, provisioned EFS throughput Provision only what the workload needs
Minimums Minimum storage duration, minimum billable object size Match the class to the real object lifetime and size

The trade-off is almost always the same: the cheaper the per-GB price, the higher the retrieval cost, the longer the retrieval time, or the stricter the minimums.

2. Amazon S3 storage classes

Amazon S3 offers one API and several classes. Regional classes store data across at least three Availability Zones. One Zone classes use a single AZ and do not protect against its destruction, even where the published durability design target is also 11 nines.

Class Designed for Retrieval Min. storage duration Notes
S3 Standard Frequently accessed data Milliseconds None Hot-data storage rate, no retrieval fee
S3 Intelligent-Tiering Unknown or changing access patterns Milliseconds (frequent, infrequent, archive instant access tiers) None Monitoring and automation fee per object; no retrieval fee
S3 Standard-IA Infrequently accessed, needed quickly Milliseconds 30 days Lower storage price, per-GB retrieval fee, 128 KB minimum billable size
S3 One Zone-IA Re-creatable infrequent data Milliseconds 30 days Single AZ, lower storage rate than Standard-IA; risk of data loss if the AZ is destroyed
S3 Glacier Instant Retrieval Archive data read about once a quarter, still needs milliseconds Milliseconds 90 days Cheaper than Standard-IA for storage, higher retrieval fee
S3 Glacier Flexible Retrieval Archives that can wait minutes to hours Expedited 1-5 minutes, Standard 3-5 hours, Bulk 5-12 hours (bulk retrievals have no per-GB fee) 90 days Very low storage price
S3 Glacier Deep Archive Long-term retention, rarely if ever read Standard within 12 hours, Bulk within 48 hours 180 days Lowest price of all S3 classes
S3 Express One Zone Latency-critical, single-digit-millisecond workloads Milliseconds None A performance class; compare capacity and request rates for the actual workload

Two details cause exam errors. First, minimum storage duration is a billing rule: if you delete or transition an object out of Standard-IA after 10 days, you are still billed for 30 days. Second, objects smaller than 128 KB are billed as 128 KB in the infrequent access classes, so storing millions of small files in Standard-IA can cost more than Standard.

Exam tip. If a stem says "archive", "compliance retention", and "retrieved in 12 hours is acceptable", the answer is Glacier Deep Archive. If it says "archive but the auditors need results in milliseconds", the answer is Glacier Instant Retrieval. If it says "unknown access pattern", the answer is Intelligent-Tiering. If it says "re-creatable" or "secondary copy" with infrequent access, One Zone-IA becomes eligible.

2.1 S3 Intelligent-Tiering in practice

Intelligent-Tiering moves each object automatically as its access pattern changes:

  • Frequent Access tier (same price as Standard) for recently accessed objects.
  • Infrequent Access tier after 30 consecutive days without access.
  • Archive Instant Access tier after 90 days without access.
  • Optional Archive Access (90 days or more) and Deep Archive Access (180 days or more) tiers that you opt into, with minutes-to-hours retrieval.

You pay a per-object monitoring and automation charge, with no automatic tier-movement fee. Standard and Bulk archive restores are free; Expedited retrieval from the optional Archive Access tier has additional charges. Objects smaller than 128 KB are never auto-tiered and are not charged the monitoring fee, so they stay at Standard rates. Intelligent-Tiering suits unpredictable access patterns. For a known transition date and predictable retrievals, compare lifecycle pricing against monitoring, transitions and retrievals rather than assuming one class is always cheaper.

2.2 Worked example: choosing the class

Scenario. A media company stores 400 TB of finished video renders. For the first 30 days after publication they are read constantly. After that, readers rarely fetch them, but when someone does, the file must start streaming within seconds. The company does not need to keep the renders for more than 5 years. There is no way to predict which old titles become popular again.

Step 1: identify the constraints. Hot period of 30 days; after that, rare reads with a millisecond retrieval requirement; unpredictable popularity; 5-year retention.

Step 2: rule out classes. Glacier Flexible Retrieval and Deep Archive need minutes to hours, so they violate "start streaming within seconds". One Zone-IA reduces availability and durability protection for data that is expensive to recreate. Express One Zone introduces single-AZ risk and an unnecessary latency-oriented design.

Step 3: compare the viable options. (a) Lifecycle rule moving objects to Standard-IA after 30 days. Cheap, millisecond access, but a retrieval fee on each read. If an old title goes viral and is read many times, the retrieval fees accumulate. (b) Intelligent-Tiering from day one. No retrieval fees, automatic return to the frequent tier when a title becomes popular again, and a modest monitoring fee. (c) Lifecycle to Glacier Instant Retrieval. Cheapest storage but the highest retrieval fee, appropriate only if reads are truly rare (about once a quarter).

Step 4: decide. Because popularity is unpredictable and the renders are large (the monitoring fee per object is negligible per GB), S3 Intelligent-Tiering is the best choice, with a lifecycle expiration rule at 5 years to stop paying for expired content. Standard-IA is the runner-up if the access data later proves renders are almost never reread.

Why the other options are weaker. Keeping everything in Standard does not automatically reduce storage charges when titles become inactive. Deep Archive breaks the retrieval requirement. Glacier Instant Retrieval requires comparing retrieval charges against storage savings; unpredictable repeated reads favor Intelligent-Tiering here.

3. S3 Lifecycle management

A lifecycle configuration applies rules to a bucket or to a prefix, tag, or object-size filter. Two kinds of actions exist:

  • Transition actions move objects to another storage class after a number of days since creation (for example Standard to Standard-IA after 30 days, to Glacier Flexible Retrieval after 90 days, to Deep Archive after 365 days).
  • Expiration actions remove eligible objects or versions according to versioning and retention rules. Noncurrent-version expiration, expired delete-marker cleanup and aborting incomplete multipart uploads use their own lifecycle actions.

Example rule for a log bucket (JSON abbreviated):

JSON
{
  "Rules": [{
    "ID": "logs-tiering",
    "Status": "Enabled",
    "Filter": { "Prefix": "logs/" },
    "Transitions": [
      { "Days": 30,  "StorageClass": "STANDARD_IA" },
      { "Days": 90,  "StorageClass": "GLACIER" },
      { "Days": 365, "StorageClass": "DEEP_ARCHIVE" }
    ],
    "Expiration": { "Days": 2555 },
    "AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 7 }
  }]
}

Rules to remember:

  • Transitions follow the waterfall direction (Standard toward colder classes). You cannot lifecycle-transition from a colder class back to a warmer class; copy it into an eligible warmer class; archived Flexible Retrieval or Deep Archive objects must first be restored.
  • Transitions to Standard-IA or One Zone-IA require the object to have been stored at least 30 days in an eligible source class. Rules that transition earlier than allowed are rejected.
  • New or modified lifecycle configurations skip objects smaller than 128 KB by default, unless an explicit size filter overrides that behavior.
  • Every transition has a per-request charge. Moving ten million 10 KB objects can cost more in request fees than it saves, which is why you can filter lifecycle rules by minimum object size.
  • With versioning, you need separate rules for noncurrent versions (for example move to Glacier after 30 days and permanently delete after 365). Forgetting this is a classic hidden cost: old versions of a frequently overwritten object accumulate indefinitely.
  • Incomplete multipart uploads continue to bill for stored parts until aborted; always add the abort rule.

3.1 Finding the right thresholds

Do not guess. S3 Storage Class Analysis observes access patterns for a prefix over weeks and recommends when to transition data to Standard-IA. S3 Storage Lens provides organization-wide dashboards (percentage of noncurrent versions, incomplete multipart upload bytes, objects by class). Cost Explorer and the Cost and Usage Report attribute spend by bucket via cost allocation tags.

4. Archival, retention, and compliance without overspending

Regulated data ("keep for 7 years, never modify") creates a trap: the strictest options are not always the cheapest.

Requirement Cost-efficient feature
Records cannot be deleted or changed for a period S3 Object Lock (governance or compliance mode) on a bucket with versioning; combine with lifecycle to Glacier
Vault-level legal hold for archive S3 Glacier Vault Lock policy (legacy S3 Glacier vaults)
Automatic deletion after the retention period ends Lifecycle expiration rule
Prove retrieval is possible within an SLA Choose the retrieval tier (Expedited, Standard, Bulk) to match; do not pay for Expedited when Bulk is acceptable
Occasional restores of a few objects Standard or Bulk retrieval rather than keeping the data in a warmer class

Retrieval tier arithmetic. If a legal team must retrieve 5 TB from Glacier Flexible Retrieval once a year and has 48 hours to do so, Bulk retrieval (hours, no per-GB fee) is substantially cheaper than Expedited. Select a retrieval tier whose documented time range meets the deadline: Standard is typically 3–5 hours and Bulk 5–12 hours for Flexible Retrieval. Use Expedited when its shorter latency is required; never infer a universal tier from the phrase "next business day".

5. Amazon EBS cost optimization

EBS cost depends on provisioned volume size, volume type, provisioned IOPS and throughput, and snapshots.

Type Medium Use for Cost note
gp3 SSD General purpose: boot volumes, dev/test, most databases About 20% cheaper per GB than gp2; baseline 3,000 IOPS and 125 MiB/s included, extra IOPS and throughput purchased independently of size
gp2 SSD Legacy general purpose IOPS scale with size (3 IOPS/GB), so you may buy capacity just to get IOPS
io2 Block Express SSD Latency-sensitive databases needing sustained high IOPS Most expensive; pay per provisioned IOPS
st1 HDD Throughput-oriented sequential workloads (logs, data warehouse, streaming) Much cheaper per GB; cannot be a boot volume
sc1 HDD Coldest, infrequently accessed block data Cheapest EBS type; cannot be a boot volume

Common savings.

  1. Migrate gp2 to gp3 online with Elastic Volumes on supported instances to obtain independent IOPS and a lower capacity rate. Keep the current size: Elastic Volumes cannot shrink a volume.
  2. Stop paying for unattached volumes. Volumes left behind after instances are terminated still bill. Delete them after snapshotting if needed. AWS Compute Optimizer and Trusted Advisor flag idle volumes.
  3. Prune snapshots. Snapshots are incremental, but old ones still cost. Automate with Amazon Data Lifecycle Manager (DLM) or AWS Backup schedules and retention. Moving rarely restored snapshots to the EBS Snapshots Archive tier costs less per GB, with restore taking up to 72 hours and a 90-day minimum. Each archived snapshot becomes a full snapshot, so compare its complete stored size and retrieval charges with the incremental Standard tier.
  4. Right-size. Over-provisioned IOPS on io2 is pure waste if CloudWatch operation counts divided by the metric period show consistently low read/write IOPS, including peaks. Switching to gp3 may meet the need at a fraction of the cost.

5.1 Worked example: EBS right-sizing

Scenario. A reporting team runs 40 EC2 instances, each with a 500 GB io2 data volume provisioned at 10,000 IOPS. CloudWatch shows peak usage of 2,500 IOPS and 120 MB/s. The workload tolerates single-digit-millisecond latency.

Step 1: compare requirements and capability. Regional gp3 supports up to 80,000 IOPS and 2,000 MiB/s per volume with size/ratio constraints (Outposts: 16,000 IOPS / 1,000 MiB/s). The workload peaks at 2,500 IOPS and 120 MB/s, which fits inside gp3's included baseline of 3,000 IOPS and 125 MiB/s.

Step 2: decide. Change each volume to gp3 with the Elastic Volumes feature (no detaching). The team pays for 500 GB of gp3 and no extra provisioned IOPS, rather than 10,000 provisioned IOPS on io2.

Why not st1? st1 is throughput-optimized HDD with a baseline tied to size and poor random I/O, a mismatch for a workload that is measured in IOPS. Why not keep io2? Nothing in the stem requires io2's consistent sub-millisecond latency, higher durability or performance beyond regional gp3; required IOPS and throughput fit its included baseline.

6. File storage: EFS and FSx

6.1 Amazon EFS

EFS charges for stored data. Cost levers:

  • EFS Standard (multi-AZ) versus EFS One Zone (single AZ, roughly 47% cheaper, for re-creatable or dev/test data).
  • EFS Infrequent Access (IA) and Archive storage classes with EFS lifecycle management: files not read for 30 days (configurable) move automatically to IA; the Archive timer is also measured since last access in Standard, not an extra period after entering IA. Defaults are 30 days to IA and 90 days to Archive. Archive requires supported Regional/Elastic-throughput configuration, has a 90-day minimum, and both cold classes have a 128 KiB minimum billable file size plus access/tiering charges.
  • Intelligent-Tiering for EFS can return files to Standard when you set the transition policy to On first access. This return is not enabled by default; the triggering access and applicable tiering charges still need to be included.
  • Throughput mode: Elastic throughput bills for the throughput you use; Provisioned throughput bills for what you reserve even if idle. Compare sustained-use pricing, supported file-system types and required throughput before selecting a mode; Archive compatibility also constrains the choice.

6.2 Amazon FSx

Service When it is cost-effective
FSx for Windows File Server Windows (SMB, Active Directory) workloads; choose HDD for cost-sensitive shares, SSD for latency; enable data deduplication to reduce stored bytes
FSx for Lustre Short-lived high-performance computing; use Scratch 2 file systems (temporary, no data replication) for temporary processing, Persistent for longer-lived data; can link to S3 so you keep cold data in S3
FSx for NetApp ONTAP Migrating NetApp workloads; capacity pool tiering moves cold data to a cheaper tier; compression and deduplication
FSx for OpenZFS Migrating ZFS workloads with snapshots and cloning

The main exam pattern: "Windows file shares, minimize cost, tolerate higher latency" → FSx for Windows with HDD, and "temporary HPC scratch space" → FSx for Lustre Scratch 2 with an S3 data repository association. Export valuable outputs to S3 and confirm completion before deleting scratch storage; Scratch 1 does not support the same DRA/automatic-export features.

7. Backup and snapshot cost

AWS Backup centralizes backup policies for EBS, EFS, FSx, RDS, DynamoDB, EC2, and more. Save money by:

  • Defining retention in the backup plan (for example daily backups for 35 days, monthly for 12 months) so old recovery points are deleted automatically.
  • Using lifecycle to cold storage for backup types that support it (for example EFS and DynamoDB with AWS Backup advanced features; check the service/Region support matrix) after a number of days, remembering the 90-day minimum in cold storage.
  • Avoiding duplicate protection: if AWS Backup already protects an EBS volume, a second DLM schedule can create redundant recovery points and extra charges. The increase is not necessarily twofold because snapshots are incremental and may share blocks.
  • Copying backups cross-Region only when the recovery objectives require it, because copies add storage and transfer charges.

8. Cost-efficient data migration and hybrid storage

Moving data to AWS is a cost decision as well as a time decision.

Situation Cost-efficient choice Reasoning
5 TB, adequate bandwidth, recurring or one-time AWS DataSync Compare mode-specific transferred-data charges, task-execution fees where applicable, requests and network costs; incremental copies avoid retransferring unchanged files
200 TB, slow or shared link Data Transfer Terminal/qualified offline partner; Snowball Edge only for eligible existing customers Compare full logistics and validation cost; Snowball is closed to new customers since November 2025
Several petabytes Parallel transfer paths or an eligible terminal/partner solution Compare site access, preparation, encryption, transport and ingestion capacity
On-premises apps keep using NFS/SMB, cold data sits in S3 S3 File Gateway Local cache keeps hot data fast while capacity lives in lower-cost S3
Tape backup replacement Tape Gateway to S3 Glacier / Deep Archive Eliminates physical tape handling
Uploading to S3 from far away S3 Transfer Acceleration Faster but billed per GB; use only if latency or distance justifies it

Hidden cost: data transfer in. Transfer from the internet into AWS is free, but transfer out is charged. A design that exports large volumes to on-premises analytics every day may be more expensive than analyzing in AWS with Athena.

S3 Requester Pays shifts successful request and download-transfer charges to an authenticated requester who accepts them. Anonymous access is not supported. The owner still pays storage, and archive restoration retrieval charges remain with the owner.

9. Common pitfalls and exam tips

  • Deleting is the cheapest tier. If data has no business or regulatory value after a point, the best answer includes an expiration rule.
  • Do not archive hot data. Putting daily-read data in Glacier trades a small storage saving for retrieval fees and delays.
  • Minimum duration still bills. Lifecycle transitions out of Standard-IA before 30 days waste money, and short-lived objects (hours or days) belong in Standard.
  • Small objects. Standard-IA, One Zone-IA and Glacier Instant Retrieval have a 128 KB minimum billable size. Glacier Flexible Retrieval and Deep Archive instead add 40 KB of metadata per object (8 KB at Standard rates and 32 KB at the archive rate). Include transition requests and the current small-object filter.
  • One Zone is for re-creatable data. Never choose it for the only copy of important data.
  • Exam tip: "Least operational overhead" plus "unpredictable access" → Intelligent-Tiering. "Known pattern" plus "lowest cost" → lifecycle policy.
  • Exam tip: Between two otherwise valid answers, prefer the one that is managed (lifecycle, Backup, DLM, Storage Gateway) over a custom script or cron job.
  • Exam tip: gp3 beats gp2 on price in nearly every question; st1/sc1 are for throughput and cold data, never boot volumes.
  • Do not confuse retrieval time with availability. Standard-IA is millisecond access with lower availability SLA than Standard; Glacier Flexible Retrieval is not instantly readable.

10. Mini case study (with solution)

Scenario. HealthArchive stores medical imaging studies. Every study is read heavily for 14 days, occasionally for 6 months, and is then retained for 10 years for regulatory purposes. Radiologists occasionally need an old study within minutes. Compliance requires that studies cannot be altered or deleted before 10 years. The bucket holds 600 TB, with 30% of the object count consisting of files below 100 KB (thumbnails and metadata files). The CFO notices that the monthly storage bill is mostly S3 Standard. A recent audit also found 15 TB of leftover incomplete multipart uploads and 40 TB of noncurrent versions from a re-upload bug.

Question. Redesign the storage for minimum cost while keeping the compliance and retrieval requirements.

Solution.

  1. Compliance: enable S3 Object Lock in compliance mode with a 10-year default retention on a versioned bucket. Apply suitable retain-until dates to existing versions too: a new bucket default does not retroactively protect them. Locked versions remain immutable, but new versions or delete markers can still be created. Lifecycle transitions remain possible; see encryption, governance and retention controls.
  2. Large imaging files (above 128 KB): lifecycle rule: Standard for 14 days, then compare Standard-IA, Glacier Instant Retrieval and Intelligent-Tiering using measured read volume. Keep Standard through day 30 if selecting Standard-IA. Glacier Instant Retrieval can transition earlier, but is attractive only when retrieval fees and its 90-day minimum fit the access pattern. All three support immediate reads.
  3. Small files (thumbnails and metadata under 128 KB): keep these in Standard, or exclude them from transitions with an object-size filter, because the 128 KB minimum billing and per-request transition fees would erase any savings.
  4. Version cleanup: expire noncurrent versions only after Object Lock retention and legal holds permit deletion. Abort incomplete multipart uploads after 7 days; lifecycle cleanup is asynchronous. Fix the upload bug and verify storage metrics after cleanup.
  5. Expiration: after 10 years and one day, expire eligible current objects, remove eligible noncurrent versions after retention/holds end, and clean up expired delete markers. Current-version expiration alone can add a marker while old versions remain billable. Verify deletion of every version before expecting storage charges to cease.
  6. Visibility: turn on S3 Storage Lens and Storage Class Analysis to confirm the access assumptions, and tag the bucket for cost allocation.

Why not Deep Archive? Retrieval can take up to 12 hours (Standard) or 48 hours (Bulk), violating the "within minutes" need. Why compare Standard-IA? Both classes provide millisecond access; Standard-IA may win when the first six months involve more retrievals than Glacier Instant Retrieval pricing supports. Why not a custom script to move files? Lifecycle rules are managed, free of compute cost, and auditable.

11. Key terms

  • Storage class: S3 pricing and availability tier chosen per object.
  • Lifecycle rule: S3 policy that transitions or expires objects automatically.
  • Minimum storage duration: shortest period for which an object is billed in a class.
  • Intelligent-Tiering: S3 class that moves objects between access tiers automatically.
  • Object Lock: WORM (write once, read many) protection with retention periods and legal holds.
  • gp3: EBS general purpose SSD with IOPS and throughput independent of size.
  • EBS Snapshots Archive: lower-cost tier for rarely restored snapshots.
  • DLM: Amazon Data Lifecycle Manager, automates EBS snapshot and AMI lifecycle.
  • EFS IA / Archive: lower-cost EFS classes selected by lifecycle policy.
  • Storage Lens: S3 usage and activity analytics across accounts.
  • Requester Pays: S3 bucket setting making the downloader pay request and transfer costs.

12. Summary checklist

  • I can match an S3 access pattern and retrieval time to a storage class.
  • I can explain minimum storage durations, the 128 KB minimum, and transition request costs.
  • I can write lifecycle rules including noncurrent version expiration and multipart cleanup.
  • I know when Intelligent-Tiering is better than a lifecycle rule and when it is not.
  • I can choose between gp3, io2, st1, and sc1, and remove unattached volumes and old snapshots.
  • I can use EFS lifecycle (IA, Archive), One Zone, and Elastic throughput to reduce cost.
  • I can choose between FSx options and between DataSync, Snow family, and Storage Gateway for cost-efficient migration.
  • I can combine Object Lock, lifecycle, and AWS Backup retention to satisfy compliance without overpaying.

For migration deadlines, combine these costs with DataSync, transfer-service selection and bandwidth calculations.

Sources