• 12 heures
  • Moyenne

Ce cours est visible gratuitement en ligne.

course.header.alt.is_certifying

J'ai tout compris !

Mis à jour le 25/10/2024

Understand the Simple Storage Service (S3)

Amazon Simple Storage Service (shortened to S3) is a data storage service. It’s really just a way of storing files on the internet, and it has proved extremely popular. So popular, in fact, that it’s probably the most well-known AWS service, along with EC2.

Let’s Demystify Amazon S3

The S3 concept is so simple that at first, I had a lot of questions. Things like:

So, is it similar to a hosting service?

Yes, but not a website hosting service. You need to see it as a huge file hosting service.

(Well, you can actually store basic HTML pages, but not things like PHP or Ruby scripts.)

Is it an FTP site?

No. S3 isn’t accessible via FTP (which is actually a really old protocol), but as you’ll see, it is similar to FTP in a number of ways. You can upload files and read them.

Do you have to pay for it?

There is a free usage limit that will probably be fine to start with (five GB of storage).

You would normally pay for the space you need, the number of file uploads and downloads, and bandwidth used. So yes, there is a cost involved, but it’s reasonable if you don’t use it extensively.

But what do people actually use it for?

To store all kinds of files on the internet. For example:

  • Netflix uses it to store video files of its films and series.

  • Airbnb uses it to store hosts’ photos.

  • OpenClassrooms uses it to store the images used on its courses, examples and videos to download, and exercises done by students as part of their activities and projects.

  • Lots of people use it to store backups of their databases.

Advantages of Amazon S3

In summary, S3 is kind of like a huge FTP host, but it doesn’t use FTP. “Okay,” you might be wondering. “But how does that help me? After all, files can be hosted on our EC2 web servers, can’t they?”

Here’s a little list of advantages of using S3:

  • You can easily configure access rights for each file, setting who can read, update, and delete each file.

  • You can encrypt content on S3 for security reasons, if you wish.

  • Your files can be put under version control, which means you can return to a previous version at any time.

  • Your files can have an expiry date, which means they’ll be automatically deleted after a given period of time.

  • Your files can be automatically replicated to a number of AWS data centers. This means you can mitigate the risk of losing important data.

  • There is no limit to storage space. There’s no risk of getting stuck because your hard disk is full. I’ve had that happen on a server and let me tell you, it’s a nightmare! The server goes berserk! 

  • The final point to make is that S3 storage can be up to four times cheaper than EBS disks.

Explore Amazon S3’s Structure

With Amazon S3, your data is stored in buckets. These are like huge containers that can store as many files as you like (split into internal folders if required).

Within each bucket, you can upload files (which are known as objects) and provide associated metadata. You can indicate what type of metadata you want to store (file author, for example).

You can store objects (files) within buckets in S3
You can store objects (files) within buckets in S3

It’s relatively simple, which is pretty appropriate for a service called Simple Storage Service!

S3 has become so popular that big companies often store hundreds or even thousands of terabytes on S3, except that the files aren’t necessarily accessed with the same frequency.

Website images are loaded each time a user visits the site. However, a database backup is only retrieved once a year. It would be unfortunate to have to pay the same storage costs for these very different types of files.

But don’t worry, AWS has already thought of that! They’ve introduced various storage classes on S3. It’s a pretty simple idea. The less frequently a file is used, the less you’ll pay for the storage.

For example, if you had a one GB object classed as Standard, you’d pay $0.023 per month and the object could be retrieved in a few milliseconds. If you stored the same file in the “S3 Glacier Deep Archive,” you’d only pay $0.00099, which is 23 times cheaper, but you’d need to wait several hours before being able to retrieve your file.

You can see the list of storage classes by following this link. They all provide a slightly different variation, balancing price with access time.

S3 storage classes
S3 storage classes

Let’s Recap!

  • Amazon S3 is an AWS unstructured storage service for raw files, which are also known as objects.

  • S3 storage prices make it an attractive option for storing large backup files, website images, etc.

  • Data is stored in buckets on Amazon S3. Each bucket can hold many folders and files.

  • A file stored on Amazon S3 can use one of a number of storage classes, depending on the level of access required. The S3 Glacier Deep Archive storage class costs 23 times less than the “Standard” class, but you need to wait several hours before being able to retrieve your file.

So that’s it for your introduction to Amazon S3. Shall we actually start using it in the next chapter?

Exemple de certificat de réussite
Exemple de certificat de réussite