Cost-Optimized Storage and Databases

Topics Covered

S3 Storage Classes

The S3 classes

Durability and availability

Retrieval options for Glacier

Minimum durations and object sizes

S3 Intelligent-Tiering

Choosing a class

Request and data transfer costs

Reading storage class clues in questions

How the cost of a class really adds up

Worked example: choosing classes for a photo service

Uploading directly to a class

Common storage class traps

Quick check

Final tip

Remember

Last check

Storage costs grow quietly because data accumulates and is rarely deleted. The exam tests choosing storage classes by access pattern, automating transitions and avoiding hidden charges for requests, retrievals and replication. S3 Storage Classes and Lifecycle in the AWS in Practice course covers the classes in more depth.

The S3 classes

S3 Standard has the highest storage price but no retrieval charge and suits frequently accessed data. S3 Standard-Infrequent Access costs less to store but charges per gigabyte retrieved, with a 30 day minimum storage duration and a 128 KB minimum billable object size, suiting data read less than about once a month that still needs millisecond access. S3 One Zone-IA stores data in a single Availability Zone for about 20 percent less than Standard-IA, suiting re-creatable data such as secondary backups or thumbnails that can be regenerated. S3 Glacier Instant Retrieval offers archive pricing with millisecond access for data read about once a quarter, with a 90 day minimum. S3 Glacier Flexible Retrieval costs less again, with retrievals in minutes to hours and a 90 day minimum. S3 Glacier Deep Archive is the cheapest, with retrievals in 12 to 48 hours and a 180 day minimum, suiting compliance archives kept for years.

S3 storage classes trade storage price against access cost and speed.

Durability and availability

All classes except One Zone-IA store data across at least three Availability Zones and offer eleven nines of durability. One Zone-IA has the same durability within its zone but loses data if the zone is destroyed. Availability targets are slightly lower for the IA classes. Choosing One Zone-IA for the only copy of important data is a common wrong answer.

Retrieval options for Glacier

Glacier Flexible Retrieval offers expedited retrieval in minutes, standard in hours and bulk in up to about 12 hours at the lowest cost. Deep Archive offers standard retrieval within 12 hours and bulk within 48 hours. Provisioned retrieval capacity guarantees expedited retrievals. Restored objects are temporary copies kept for a number of days you choose. Questions that ask for the cheapest way to retrieve a large archive with no urgency expect bulk retrieval.

Minimum durations and object sizes

Minimum storage durations mean that deleting or transitioning an object early still bills for the minimum period. Minimum billable sizes mean that millions of tiny objects in IA classes cost more than expected. Lifecycle transitions also charge per request, so moving billions of small objects can cost more than it saves. Aggregating small files into larger objects before archiving avoids both problems.

S3 Intelligent-Tiering

Intelligent-Tiering monitors access to each object and moves it automatically between a frequent access tier, an infrequent access tier after 30 days without access and an archive instant access tier after 90 days, all with millisecond access. Optional archive access and deep archive access tiers move objects further after 90 or 180 days, with asynchronous retrieval. There are no retrieval charges, only a small monthly monitoring fee per object over 128 KB, and objects smaller than 128 KB stay in the frequent tier. It suits data with unknown, changing or unpredictable access patterns, such as data lakes and user uploads.

Intelligent-Tiering suits unknown or changing access patterns.

Choosing a class

Know the access pattern: frequent means Standard; known infrequent but immediate means Standard-IA or Glacier Instant Retrieval depending on how rare; re-creatable infrequent means One Zone-IA; archive with hours of delay acceptable means Glacier Flexible Retrieval or Deep Archive; unknown or changing means Intelligent-Tiering. Analyse access with S3 Storage Class Analysis and S3 Storage Lens before choosing.

Request and data transfer costs

S3 charges for requests as well as storage, with PUT, COPY, POST and LIST requests costing more than GET requests, and IA and Glacier classes charging more per request. Workloads with very many small requests can spend more on requests than storage. Data transferred out to the internet is charged, while transfer to CloudFront from S3 is free, so serving content through CloudFront often lowers cost. Requester Pays buckets shift request and transfer costs to the requester, useful for sharing large public data sets.

Reading storage class clues in questions

Exam scenarios describe access patterns in ways that point to a class. Phrases such as accessed many times a day, active data or hot point to S3 Standard. Phrases such as accessed about once a month but must be available immediately point to Standard-IA. Phrases such as can be recreated, secondary copy or derived data point to One Zone-IA. Phrases such as accessed once a quarter with millisecond retrieval point to Glacier Instant Retrieval. Phrases such as retrieval within hours is acceptable point to Glacier Flexible Retrieval. Phrases such as retained for years, rarely if ever accessed and retrieval within two days point to Glacier Deep Archive. Phrases such as unknown, unpredictable or changing access point to Intelligent-Tiering. Spotting these before reading the options removes most distractors.

How the cost of a class really adds up

The monthly price per gigabyte is only one part of the bill. The full cost of a class includes storage, requests, retrievals, monitoring fees for Intelligent-Tiering, minimum duration charges for early deletion and data transfer out. A class with cheap storage can cost more than Standard if objects are read often, because retrieval charges are added for every gigabyte read. A useful rule is that IA classes save money only when each object is read less than about once a month. Glacier classes save money only when objects are read a few times a year or less.

Worked example: choosing classes for a photo service

A photo sharing service stores originals, resized thumbnails and nightly database exports. Originals are viewed heavily for a few weeks after upload and then occasionally, with no clear pattern, so they go into Intelligent-Tiering. Thumbnails can be regenerated from originals, are small and are read often, so they stay in Standard, because their small size would make IA minimum object charges wasteful. Database exports are needed only if a restore is required and must be kept for a year, so they go straight to Glacier Flexible Retrieval with an expiration after 365 days. Each choice follows access frequency, object size and whether data can be recreated.

Uploading directly to a class

Objects can be uploaded directly into any class by setting the storage class on the PUT request, rather than uploading to Standard and transitioning later. Uploading archives straight to Glacier Deep Archive avoids paying for Standard storage and a transition request. Backup tools and AWS Backup can also write directly to colder classes.

Common storage class traps

Watch for answers that place the only copy of important data in One Zone-IA, answers that use Glacier Flexible Retrieval when millisecond access is required, answers that use Standard-IA for data read many times a day and answers that move very small objects into IA classes. Watch also for Intelligent-Tiering being rejected because of retrieval fees, since it has none.

Quick check

Before choosing a class, ask how often the data is read, how quickly it must be available, whether it can be recreated, how large the objects are and how long they must be kept. These five answers decide the class.

Final tip

When a question says access patterns are unknown or changing and asks for the most cost effective option without operational overhead, Intelligent-Tiering is almost always the answer.

Remember

Storage price, request price, retrieval price, minimum duration and minimum object size together decide the real cost of a class. A class that looks cheapest per gigabyte can be the most expensive choice for small objects or data that is read often, so always compare the full cost for the actual access pattern before choosing. When in doubt and the pattern is unclear, Intelligent-Tiering removes the guesswork.

Last check

Before submitting an answer about storage classes, confirm that the chosen class meets the retrieval time in the question, that it keeps enough copies for the importance of the data and that its minimum duration fits how long the data will actually be stored. If any of these fail, the cheaper class is the wrong answer.

Unknown access pattern? Intelligent-Tiering

When nobody can say how often objects will be read, Intelligent-Tiering moves each object to the cheapest tier automatically with no retrieval charges.