Design Cost Optimized Architectures · Topic 1 of 5
Cost Optimized Storage
Lower storage cost on AWS with the right S3 storage class, lifecycle rules, EBS volume types, EFS tiers and snapshot clean up for each access pattern.
- 5 min
- Match the S3 class to the access pattern, and use lifecycle rules to move or expire data automatically.
- Intelligent-Tiering suits unknown access patterns and has no retrieval fee.
- One Zone-IA is cheaper but stores data in one AZ, so use it only for data you can re-create.
What it is
Storage costs grow quietly, because data accumulates and old data is rarely cleaned up. The cost goal is to keep each piece of data on the cheapest storage that still meets its access and durability needs.
The key question is how often the data is read and how fast it must come back. Frequently used data belongs on fast, higher priced storage. Rarely used data belongs on cold, cheap storage that charges more or waits longer to retrieve.
How it works
S3 storage classes
| Class | Access pattern | Notes |
|---|---|---|
| S3 Standard | Frequent access | Highest storage price, no retrieval fee |
| S3 Intelligent-Tiering | Unknown or changing access | Moves objects between access tiers automatically, with no retrieval fee, and a small monitoring charge per object |
| S3 Standard-IA | Infrequent access, needs fast retrieval | Lower storage price, retrieval fee, minimum storage duration |
| S3 One Zone-IA | Infrequent, re-creatable data | Stored in one AZ only, so cheaper and less resilient |
| S3 Glacier Instant Retrieval | Archive read rarely but needed in milliseconds | Low storage price, retrieval fee |
| S3 Glacier Flexible Retrieval | Archive, retrieval in minutes to hours | Cheaper again |
| S3 Glacier Deep Archive | Long term archive, retrieval in hours | Lowest storage price in S3 |
IA stands for infrequent access. The colder classes have a minimum storage duration (30 days for the IA classes, 90 days for Glacier Instant and Flexible Retrieval, and 180 days for Deep Archive), so deleting early still bills for the full period. The IA classes also bill a minimum object size, which makes many tiny objects poor candidates.
Choose Intelligent-Tiering when the access pattern is unpredictable, since it avoids retrieval fees and manual tuning. Choose a fixed IA or Glacier class when the pattern is known.
Lifecycle rules
An S3 lifecycle configuration moves objects between classes and deletes them on a schedule, with no code.
{
"Rules": [{
"ID": "age-out-logs",
"Status": "Enabled",
"Filter": {"Prefix": "logs/"},
"Transitions": [
{"Days": 30, "StorageClass": "STANDARD_IA"},
{"Days": 90, "StorageClass": "GLACIER"}
],
"Expiration": {"Days": 365}
}]
}
Rules can also remove old noncurrent versions of versioned objects and clean up incomplete multipart uploads, both of which otherwise keep costing money without being visible.
Other savings in S3
S3 Storage Lens and storage class analysis show where the data is and how it is used. Requester Pays buckets shift the data transfer cost to the person who downloads. Compressing data before storing it also reduces both storage and transfer cost.
EBS savings
- Use gp3 instead of gp2 for most volumes, since it gives a baseline of performance at a lower price per GB and lets you pay for extra IOPS only when needed.
- Use st1 or sc1 HDD volumes for large, sequential, infrequent data.
- Delete volumes that are no longer attached to an instance.
- Right size volumes to what the workload really needs.
- Manage snapshots with Amazon Data Lifecycle Manager, so old ones expire. Snapshots are incremental, but unused ones still add up. The EBS Snapshots Archive tier is cheaper for snapshots kept for a long time.
EFS savings
EFS lifecycle management moves files that are not accessed for a set time to the EFS Infrequent Access or Archive storage classes, which cost less. EFS One Zone stores data in a single AZ and is cheaper than the regional option, so it fits non critical data. Pick the throughput mode that matches real use, because provisioned throughput costs extra.
Storage that grows by itself or needs scaling
Some storage needs no capacity planning. S3 and EFS grow and shrink with your data, and you pay only for what is stored. Other services charge for what you provision, so empty space costs money.
| Service | How capacity scales |
|---|---|
| S3, EFS | Automatic, pay for used data |
| RDS | Enable storage autoscaling and set a maximum storage threshold so it cannot grow without limit |
| DynamoDB | Provisioned tables use auto scaling for read and write capacity. On demand tables need none |
| EBS | Elastic Volumes lets you grow a volume, change its type or adjust its performance while it is in use. A volume cannot be made smaller |
Start with the size you need now and grow when required, instead of provisioning for a distant peak.
Matching to a scenario
For compliance logs that must be kept for years and rarely read, use S3 with a lifecycle rule to Glacier Deep Archive. For a data lake with unknown access, use Intelligent-Tiering. For a shared file system with many cold files, use EFS lifecycle management.
"Unknown or unpredictable access pattern" points to S3 Intelligent-Tiering. "Rarely accessed, must be retrievable in milliseconds" points to Glacier Instant Retrieval. "Archive, hours to restore is fine" points to Glacier Flexible Retrieval or Deep Archive.
What to remember for the exam
- Match the S3 class to the access pattern, and use lifecycle rules to move or expire data automatically.
- Intelligent-Tiering suits unknown access patterns and has no retrieval fee.
- One Zone-IA is cheaper but stores data in one AZ, so use it only for data you can re-create.
- Glacier Deep Archive is the lowest cost S3 class, with retrieval in hours.
- Colder classes have minimum storage durations, and deleting early still bills the full period.
- gp3 is cheaper than gp2 for most use cases, and unattached EBS volumes and old snapshots are waste.
- EFS lifecycle management moves cold files to cheaper classes.
- Clean up incomplete multipart uploads and old object versions.
Common mistakes
Moving tiny objects to an IA class. A minimum billable object size and retrieval fees can make it more expensive than Standard.
Using Glacier for data read often. Retrieval fees and wait times can cost more than the storage savings.
Forgetting versioned and incomplete data. Old versions and failed uploads keep billing until a lifecycle rule removes them.
Using Provisioned IOPS everywhere. If the scenario does not demand high IOPS, gp3 meets the need at lower cost.
Transitioning objects to a cold class is not free. Request charges for lifecycle transitions can exceed the savings when there are very many small objects.
Check yourself
Which S3 class fits data with an unpredictable access pattern and no retrieval fee?
S3 Intelligent-Tiering.
How do you automatically move logs to cheaper storage and delete them after a year?
Use an S3 lifecycle configuration with transition and expiration rules.
Why is gp3 often the cost optimized EBS choice?
It gives good baseline performance at a lower price than gp2, and extra IOPS can be bought separately.
Topic 1 of 5 in Design Cost Optimized Architectures
Test yourself on Design Cost Optimized Architectures
The full AWS SAA-C03 question bank has 823 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.