DevOps best practices and cases

Amazon S3 storage classes and their comparison


In previous articles we talked about EC2, today we will look at Amazon S3 in more detail.

S3 (Simple Storage Service) is a service from AWS for data storage and retrieval. Important details about S3:
  • Files in S3 are stored in buckets (as folders).
  • S3 is an object-oriented storage (like images, videos, documents, etc.).
  • The bucket names must be unique globally because when we create it in S3, it will have a unique URL.
  • It is good practice to create buckets in the region closest to you or your customers.

Difference between storage classes

Amazon S3 has different storage classes. So when you upload a file into S3, we can provide the right storage class for our files. There are 6 types of storage classes.
  • Standard
  • Intelligent Tiering
  • Standard Infrequent Access
  • One Zone Infrequent Access
  • Glacier
  • Glacier Deep Archive

The storage classes are differentiated by such properties:
  • Storage Costs
  • Durability of the object (your file will not be lost)
  • Availability of the object (you can definitely get the desired object)
  • Access Frequency

S3 Standard

S3s have 99.99% availability and 99.99999999999% durability, which means that objects in this storage class are very accessible, and chances to lose this file are very rare. We can store files that we use regularly.
S3 is the most expensive storage standard among all others. Data is stored in several places.

We recommend using this type for user photos and other important content that needs to be available and cannot be lost.

Intelligent Tiering

It controls your data access patterns and moves data to different storage classes accordingly.
Objects in this storage have 99.90% availability and 99.99999999999% durability of objects in different locations. Less expensive than standard storage classes.

We recommend using this type if you do not know the status of your files.

S3 Standard Infrequent Access (IA)

It is used to store data that are less frequently accessed but need quick access when needed.
Objects in this storage have 99.90% availability and 99.99999999999% durability of objects in different locations.
This is cheaper than standard storage.
Amazon charges a data search fee.

We recommend using this type for database dumps that you won't need often.

S3 One Zone Infrequently Access

It is a cheap storage option compared to S3 standard storage and Standard Infrequent access.
It is used to store non-critical data with rare access or data that can be recovered in case of loss, as this storage class stores data in only one zone storage.
Objects in this storage have 99.5% availability and 99.99999999999% durability of objects in one zone of availability.

We recommend using this type for files that may be needed occasionally, such as archive data. And the old weights of machine learning models.

S3 Glacier and Glacier Deep Archive

Glacier is used for data archiving
It is the cheapest S3 storage service
Searching for data can take from minutes to hours.
Glacier Deep Archive is also used for archiving data, but the search time for Deep Archive is 12 hours.
The durability of data is 99.999999999%.

We recommend using this type to store archived data that will not be searched.

In conclusion, it is possible to draw such conclusions:
S3 Standard for important files that are used in production, such as user avatar.
S3 Standard Infrequent Access for old database dumps that are not often needed
S3 One Zone Infrequently Access for archive data, such as last year's analytics, which can be searched for.
Glacier and Glacier Deep Archive for archives for which no search is required

S3 is one of the most convenient and affordable storage devices on the market, the right type selection will help save money on infrastructure and developers' time. If you have any questions about working with S3 or building infrastructure, contact us.
Articles