Certopolis

AWS Certified Solutions Architect – Associate

S3 storage classes and lifecycle rules: which one, when

Choose an S3 storage class by how often the data is read, how fast it must come back, and how long it will stay. Infrequent-access and Glacier classes cost less to store but add retrieval fees, minimum storage durations and, for most of them, a 128 KB minimum billable size. Lifecycle rules move objects down to cheaper classes over time, and only in one direction.

The classes and their minimums

S3 Standard has no minimum duration or size and is for data read more than once a month. S3 Standard-IA and S3 One Zone-IA give millisecond access with a per-GB retrieval fee, a 30-day minimum storage duration and a 128 KB minimum billable object size. An object under 128 KB is billed as 128 KB.

S3 One Zone-IA stores data in one Availability Zone. It is designed for the same 99.999999999% durability as Standard-IA, but for 99.5% availability instead of 99.9%, and it does not survive the loss of that zone. AWS recommends it only for data you can re-create.

S3 Glacier Instant Retrieval gives millisecond access for data read about once a quarter, with a 90-day minimum and a 128 KB minimum size. S3 Glacier Flexible Retrieval has a 90-day minimum and S3 Glacier Deep Archive a 180-day minimum. Objects in those two must be restored with RestoreObject before you can read them, and each archived object carries 40 KB of extra metadata.

Deleting, overwriting or transitioning an object before its minimum duration still charges the remaining days.

S3 Intelligent-Tiering

Intelligent-Tiering is for data with unknown or changing access patterns. It charges a small monthly monitoring fee per object and no retrieval fees. Objects move to the Infrequent Access tier after 30 days without access and to the Archive Instant Access tier after 90 days. All three of these tiers return data in milliseconds.

Two optional tiers, Archive Access (from 90 days) and Deep Archive Access (from 180 days), must be activated. Objects in them must be restored before they can be read, so turn them on only if the application can wait.

Objects smaller than 128 KB are not monitored and always stay in the Frequent Access tier.

Glacier retrieval options

For Glacier Flexible Retrieval, Expedited typically takes 1 to 5 minutes, Standard 3 to 5 hours and Bulk 5 to 12 hours. Bulk retrievals from this class are free. For Glacier Deep Archive, Expedited is not available, Standard finishes within 12 hours and Bulk within 48 hours.

Provisioned capacity guarantees that Expedited retrievals are accepted when demand is high. Without it, Expedited requests can be refused.

Lifecycle transitions

Lifecycle rules follow a waterfall: Standard can move to any colder class, Standard-IA to Intelligent-Tiering, One Zone-IA or a Glacier class, and Glacier Flexible Retrieval only to Deep Archive. No rule moves an object back up. To bring archived data back to a warmer class, restore it and copy it.

By default, lifecycle rules do not transition objects smaller than 128 KB, because the per-object transition request can cost more than the storage it saves. An object size filter can override this. A rule also cannot transition an object out of a class before that class's minimum duration has passed.

Where the exam catches people

  • Believing Standard-IA is cheaper at any object size: objects under 128 KB are billed as 128 KB.
  • Believing One Zone-IA is less durable than Standard-IA: both are designed for 11 nines of durability. One Zone-IA is less available and does not survive the loss of its zone.
  • Believing Intelligent-Tiering will tier small files: objects under 128 KB are never monitored and stay in Frequent Access.
  • Believing every Intelligent-Tiering tier is instant: the optional Archive Access and Deep Archive Access tiers need a restore first.
  • Believing a lifecycle rule can move data from Glacier Deep Archive back to Standard: transitions only go down, so you must restore and copy.

Written from Amazon Web Services's documentation

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. An application writes about 400 million sensor readings a month to Amazon S3 as separate objects of roughly 20 KB each. The readings are read about once a month. A solutions architect proposes S3 Standard-IA to cut the storage bill, and the company needs the monthly storage cost of the readings to fall. What should a solutions architect do to accomplish this?

    Right. In the game that’s Renown for your Design Cost-Optimized Architectures building.

    Not that one: B is right. In the game your Design Cost-Optimized Architectures building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    At 20 KB, every object is billed as 128 KB, so 400 million objects are charged as though they were roughly 51 TB rather than 8 TB. The comparison table records the same 128 KB minimum billable size for S3 One Zone-IA and S3 Glacier Instant Retrieval, and none for S3 Standard or S3 Intelligent-Tiering. Batching the readings into larger objects removes the problem at its cause.

    Written from docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html

  2. A bucket in S3 Intelligent-Tiering holds case files of several megabytes each. Most are untouched for a year, but any file must open in milliseconds when a caseworker requests it, with no restore step. A cost review proposes activating the optional archive tiers to lower the storage price further. Which approach will meet these requirements?

    Right. In the game that’s Renown for your Design Cost-Optimized Architectures building.

    Not that one: D is right. In the game your Design Cost-Optimized Architectures building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    An object not accessed for 30 days moves to the Infrequent Access tier, and after 90 days to the Archive Instant Access tier, which "provides low latency and high-throughput performance". The optional tiers are the ones that break the requirement: the documentation is explicit that they are for data "that can be accessed asynchronously", and that "if the object that you are retrieving is stored in the Archive Access or Deep Archive Access tiers, you must first restore the object by using the RestoreObject operation". Since any case file may be opened at any moment, activating them trades a price the review wants for a delay the caseworkers cannot absorb.

    Written from docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html

  3. A lifecycle rule moves objects to S3 Glacier Deep Archive after 90 days. A product change means some of those objects are now read weekly, and the team writes a second lifecycle rule to transition them from Deep Archive back to S3 Standard. The rule does not take effect. The team needs the objects that are read weekly back in S3 Standard. Which solution meets these requirements?

    Right. In the game that’s Renown for your Design Cost-Optimized Architectures building.

    Not that one: C is right. In the game your Design Cost-Optimized Architectures building would lose a little Renown, and this question would come back later.