Lesson 2 of 7 Amazon S3

Managing Object Storage Classes, Lifecycle, Versioning and Replication

This lesson explains how Amazon S3 storage classes trade storage price against retrieval cost and speed, and how lifecycle rules, versioning and replication manage how objects change, age and move over time.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose a storage class from an object's access pattern and retrieval requirements.
  • Describe how lifecycle rules transition, expire and clean up objects and incomplete multipart uploads.
  • Explain when multipart upload is recommended and when it is required.
  • Explain how versioning, delete markers and replication protect and copy objects.

Storage classes

S3 storage classes trade storage price against the speed and cost of retrieval. Every class stores data with the same durability, and each object has its own class, so one bucket can mix them. The classes fall into three groups.

S3 Standard is for data in active use. It has the highest storage price but no retrieval fee and no minimum storage duration. S3 Intelligent-Tiering suits data whose access pattern is unknown or changes: it moves each object between frequent and infrequent access tiers according to how often it is read, for a small monitoring fee per object, with no retrieval fees.

The infrequent access classes, S3 Standard-IA and S3 One Zone-IA, cost less to store but charge for each gigabyte retrieved, and bill every object for at least 30 days and at least 128 KB. One Zone-IA keeps data in a single Availability Zone, so it suits data that can be re-created, such as thumbnails.

The Glacier classes are for archives. Glacier Instant Retrieval still returns objects in milliseconds and suits archives read about once a quarter. Glacier Flexible Retrieval and Glacier Deep Archive cost even less, but objects must first be restored with a RestoreObject request, which takes from minutes to hours for Flexible Retrieval and up to 48 hours for Deep Archive, before they can be read. The Glacier classes have minimum storage durations of 90 days, or 180 days for Deep Archive.

The following table summarises the classes, ordered approximately from the most expensive to store to the least expensive.

ClassUse forRetrieval
S3 StandardFrequently accessed dataMilliseconds, no fee
S3 Intelligent-TieringUnknown or changing access patterns; moves objects between tiers automaticallyMilliseconds for frequent and infrequent tiers
S3 Standard-IAInfrequently accessed dataMilliseconds, retrieval fee
S3 One Zone-IAInfrequent, re-creatable data in a single AZMilliseconds, retrieval fee
S3 Glacier Instant RetrievalArchives accessed about once a quarterMilliseconds
S3 Glacier Flexible RetrievalArchivesMinutes to hours
S3 Glacier Deep ArchiveLong-term archives at the lowest costUp to 48 hours

Lifecycle rules

Lifecycle rules move objects to cheaper classes after a set number of days and can delete them altogether. They can also expire old versions and clean up incomplete multipart uploads.

Example. Logs move to Standard-IA after 30 days and Glacier Flexible Retrieval after 90, and are deleted after a year. Old versions go after 30 days, and abandoned multipart uploads after 7.

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

Object size and multipart upload

A single object can be up to 50 TB (AWS raised the limit from 5 TB in December 2025, so older exam questions may still quote 5 TB). Multipart upload is recommended above 100 MB and required above 5 GB: it uploads parts in parallel and lets you retry individual parts. Always add a lifecycle rule to abort incomplete uploads, so you do not pay for orphaned parts.

50TB

Maximum object size

100MB

Size above which multipart upload is recommended

5GB

Size above which multipart upload is required

Versioning and replication

Amazon S3 can retain previous versions of objects and copy objects to other buckets. The following list describes versioning and replication.

  • Versioning keeps every version of an object. Deleting an object only adds a delete marker; remove the marker to restore the object.
  • Same-Region and Cross-Region Replication copy new objects to another bucket automatically, for compliance, lower latency or backup. Both buckets must have versioning enabled.
  • Replication applies only to new objects; use S3 Batch Operations for existing ones.
Worked example

Uploading a 20 GB video reliably

A video upload feature fails for large files over slow connections, and each failure restarts the whole upload. Multipart upload solves this:

Without multipartWith multipart upload
One request; maximum 5 GB per PUTUp to 10,000 parts; objects up to 50 TB
A failure restarts from zeroOnly the failed part is retried
One connectionParts upload in parallel for higher throughput

AWS recommends multipart for objects over 100 MB, and the SDKs' transfer managers do it automatically. Abandoned uploads leave invisible parts that are still billed, so a lifecycle rule aborts incomplete multipart uploads after 7 days.

Check yourself

After 30 days, objects are read about once a month but must still be available within milliseconds. Which lifecycle transition fits?

Show answer

A transition to S3 Standard-IA after 30 days. It keeps millisecond access at a lower storage price but adds a per-GB retrieval charge, which suits data read about once a month.

Exam Tips

Remember for the exam

  • Unknown or changing access patterns point to Intelligent-Tiering.
  • Add a lifecycle rule to abort incomplete multipart uploads so you do not pay for orphaned parts.
  • To recover an accidentally deleted object, enable versioning and remove the delete marker.
  • To copy objects automatically to another Region, use Cross-Region Replication, which requires versioning.