AWS Storage Services Part 1
Tags: aws, storage, s3, beginners
Published: 2022-07-07 19:44:31

## What is Cloud Storage?
A cloud storage service is a business that maintains and manages its customers' data and makes that data accessible over a network, usually the internet.
Cloud storage is based on a utility storage model. It offers flexible, pay-as-you-go pricing and scalability. It also provision for unlimited growth and the ability to increase and decrease storage capacity on demand.
The use cases for a cloud storage service include backup, disaster recovery, collaboration and file sharing, archiving, primary data storage and near-line storage.
Let’s do a walkthrough of some of the storage services offered by AWS.

## 1-EBS(Elastic Block Store) Volume
An EBS (Elastic Block Store) volume is a network drive you can attach to your instances while they run. It allows your instances to persist data, even after their termination. They can only be mounted to one instance at a time. An EBS volume is bound to a specific availability zone. You may want to think of the EBS as a “network USB drive”. In AWS, for the Free tier, you get 30 GB of free EBS storage of General Purpose (SSD) or Magnetic type per month. See the EBS as a network drive (i.e. not a physical drive) which uses the network to communicate with the instance, which means there might be a bit of latency. The EBS can be detached from an EC2 instance and attached to another one quickly (like a USB device). One of the key features about EBS volume is that it is locked to an Availability Zone (AZ) i.e An EBS volume in us-east-1a cannot be attached to us-east-1b. Also, in EBS, in order to move a volume across, you first need to snapshot it.
**EBS Snapshots**
This helps to make a backup (snapshot) of your EBS volume at a point in time. It is not necessary to detach a volume to do snapshot but recommended. You can also copy snapshots across Availability Zone or Region. Some of the EBS Snapshots features include;
A) EBS Snapshot Archive 
-Move a Snapshot to an “archive tier” that is 75% cheaper 
-Takes within 24 to 72 hours for restoring the archive 
B) Recycle Bin for EBS Snapshots 
-Setup rules to retain deleted snapshots so you can recover them after an accidental deletion 
-Specify retention (from 1 day to 1 year)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3q796198z5d0wgkdq1j.png)

## 2-EFS – Elastic File System
The Elastic File System is a managed NFS (network file system) that can be mounted on 100s of EC2. Elastic File System works with Linux EC2 instances in multi-Availability Zone. EFS is highly available, scalable, expensive (3x gp2), pay per use, and no capacity planning. It is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files, so your applications have the storage they need, when they need it.

**2A-EFS Infrequent Access (EFS-IA)**
This is a storage class that is cost-optimized for files not accessed every day. It offers up to 92% lower cost compared to EFS Standard. The EFS will automatically move your files to EFS-IA based on the last time they were accessed. You need to enable EFS-IA with a Lifecycle Policy E.g move files that are not accessed for 60 days to EFS-IA. It is made transparent to the applications accessing EFS.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfrc3rbz995jd3z7xmd2.png)

## 3-Amazon S3
Amazon S3(Simple Storage Service) is one of the main building blocks of AWS. It’s advertised as ”infinitely scaling” storage. A lot of websites use Amazon S3 as its backbone. Many AWS services use Amazon S3 as an integration as well.
**Amazon S3 Overview**
Amazon S3 allows users to store objects (files) in “buckets” (directories). The Buckets must have a globally unique name (across all regions all accounts). Buckets are defined at the region level. The S3 looks like a global service but buckets are created in a region.
The Objects (files) have a Key. The key is the FULL path: E.g s3://my-bucket/my_file.txt or s3://my-bucket/my_folder1/another_folder/my_file.txt . The key is composed of prefix + object name i.e s3://my-bucket/my_folder1/another_folder/my_file.txt . In addition, there’s no concept of “directories” within buckets (although the UI will trick you to think otherwise). Object values are the content of the body i.e Max object size is 5TB (5000GB), If uploading more than 5GB, then you must use multi-part upload.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/051fw5mgt06xe0nthedc.png)

## S3 Storage Classes
There are different types of storage classes in Amazon S3 and these include;
**A)S3 Standard – General Purpose**
It has 99.99% Availability and used for frequently accessed data. One of its characteristics is low latency and high throughput. It can sustain two concurrent facility failures. The use cases include: Big Data analytics, mobile & gaming applications, content distribution etc.
**B) S3 Standard-Infrequent Access (S3 Standard-IA)**
Used for data that is less frequently accessed but requires rapid access when needed. It has lower cost than S3 Standard, and it has 99.9% Availability. The use cases include: Disaster Recovery, backups etc
**C)S3 One Zone-Infrequent Access (S3 One Zone-IA)**
It has High durability (99.999999999%) in a single AZ and 99.5% Availability. The use cases include: Storing secondary backup copies of on-premise data, or data you can recreate.
**D)S3 Glacier Storage**
It is a low-cost object storage meant for archiving / backup with its pricing which includes, price for storage + object retrieval cost
i)S3 Glacier Instant Retrieval
It boasts of millisecond retrieval and great for data accessed once a quarter with minimum storage duration of 90 days 
ii)S3 Glacier Flexible Retrieval (formerly Amazon S3 Glacier):
Data can be retrieved by Expedited (1 to 5 minutes), Standard (3 to 5 hours), Bulk (5 to 12 hours) and the minimum storage duration is 90 days
iii)Amazon S3 Glacier Deep Archive
Used for long term storage and data can be retrieved by Standard (12 hours), Bulk (48 hours) with minimum storage duration of 180 days 
**E)S3 Intelligent-Tiering**
It moves objects automatically between Access tiers based on usage and there are no retrieval charges in S3 Intelligent-Tiering. It offers automatic cost savings for data with unknown or changing access patterns.

Some of the use cases of S3 includes;
i)Backup and storage 
ii)Disaster Recovery 
iii) Archive 
iv)Hybrid Cloud storage 
v)Application hosting 
vi)Media hosting 
vii)Data lakes & big data analytics 
viii) Software delivery 
ix) Static website 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/so15tiqolsczua5e6pf0.png)
I trust I have been able to breakdown Cloud storage on AWS. Watch out for the second part. Till you read from me again, stay jiggy.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ynzwtutl76bz18odn3f.png)