Stackoverflow did not exist in the early 1990s, when DOS computers were “all the rage” and QBASIC was the IDE of choice. You couldn’t simply copy and paste example code.
What you did have were a few books from a thrift store that had example programmes printed in them. You’d have to spend hours copying the code
Once you had all that code copied, you had no questions about where to store it.
Now, when it comes to storing files, the decision is no longer as simple. AWS offers various types of storage, with a different use case for each. In this post, I’ll go over the most commonly used storage services and describe their typical use cases.
Types of Cloud Storage
Data stores are classified into three types: Object, File, and Block.
Object storage is the ‘cloudiest’ type of storage. Objects, or files, are stored using a key and the contents of the store can be spread over multiple servers. This allows for a high level of availability and durability.
File stores are already familiar if you have a file server or a shared folder on your network. They organize files into folders and allow you to access them via a network.
This type of storage is all about performance. It essentially functions as a hard disc connected to whatever is using it.
What are the AWS Cloud Storage services?
First and foremost, I’ll describe the services briefly before moving on to the use cases.
S3 was one of the first AWS services to be developed. It’s essentially AWS’s default storage option. It’s quick, cheap, and can hold a LOT of data. In fact, there is no limit to the amount of storage space available. Objects (files) of up to 5 Tb in size can also be stored!
S3 Glacier (Object)
While S3 is quick to access, S3 Glacier is extremely slow to retrieve your files from. As the name would imply. Getting files (archives) from an S3 Glacier Vault can take anywhere from a minute to twelve hours, depending on how much you want to pay.
Instance Store (Block)
Instance store is a type of ephemeral storage that only exists for your EC2 instances. When the EC2 instance to which it is attached is terminated, anything stored in an instance store is destroyed. In addition, you can only access an instance store from a single instance.
Elastic Block Store – EBS (Block)
Elastic Block Store is another EC2 storage solution, but unlike instance stores, its data is persisted when an instance is terminated. You can also share an EBS across multiple instances.
Amazon EFS (File)
Elastic File Store (Amazon EFS) is a service that allows you to store files in S3 as if they were on your local network. You connect a virtual machine to your network, and it acts as a file server, storing files in AWS.
Check out the AWS documentation for more information on AWS cloud storage solutions.
How can you use them?
Of course, all these different storage services exist for a reason. They all have different applications. Let’s take a look at a few examples.
Long Term Storage
How do you save data that will not be accessed on a regular basis? Perhaps something you have to keep for a few years in case of an audit? That is the exact use case for which S3 Glacier was created.
EC2 Server Caching
The instance store is what you’re looking for if you’re running an EC2 instance that needs to cache some data. It’s ideal for caches and buffers because its content lives and dies with the EC2 instance to which it’s attached.
Apache Web Server Content
When you have a large number of instances that all require the same data, an EBS may be the best option. You could store everything in S3 and sync it as part of your bootstrap script, but using an EBS ensures that everything is kept in sync across server instances.
A File Server on Your Network
This one should be self-evident if you’ve read my descriptions of the various services. EFS is intended to provide you with the convenience of a local file store while also providing the durability of cloud storage.
This post provided an overview of main AWS cloud storage services. You’ve seen the various storage classifications and AWS’s main services for each type. You also saw a few use cases and the best service to use for each of them.