Amazon Storage Options

Amazon offers a few storage options:

  • File Storage - use EFS
  • Block Storage - use EBS and EC2
  • Object Storage - use S3

EFS works very much like your computer's directory structure. All files are classified hierarchically and each has a unique address which is used to retrieve it. Block storage is mostly used by software. Object can be any raw data such as an image, text file, pdf, etc. Objects are non-relational and unstructured. Each object has a unique id. This id is used to retrieve the object. REST API can also be used to access objects.

Elastic File System (EFS)

EFS is a fully managed service that works like a Linux file structure but offers scaleability an elasticity.

Elastic Block Storage (EBS)

EC2 instances can die once their tasks are completed. The data in these instances also die with the instances. To allow data to live beyond the life of an EC2 instance, data is stored in EBS. EBS volumes:

  • can be HDD or SSD
  • contain persistent and customizable block storage
  • are replicated in the same Availability Zones (AZ)
  • backed up using snapshots
  • are encrypted
  • are elastic

To setup EBS, go to AWS console and click on the relevant link under "Elastic Block Store"

Simple Storage Service (S3)

S3 is a fully managed storage service that provides a simple API for storing and retrieving files in AWS. The data is not associated with any EC2 instance so if you delete an instance, the data is not deleted. S3 can store any kind of data e.g. images, video, log file, text documents, etc. In S3, you create a bucket to store your data. Each bucket is associated with a region so it is replicated among several AZs in that region. It can be accessed through management console, CLI, or SDKs. By default data is not accessible by public but it can be configured to become accessible. Following are some example commands:

aws s3 cp file.txt s3://mybucket/file.txt
aws s3 sync somefolder s3://mybucket/files
aws s3 sync s3://mybucket/files somefolder