Certopolis

AWS Certified Cloud Practitioner

S3 vs EBS vs EFS: AWS storage types for Cloud Practitioner

Amazon S3 stores objects in buckets, with no limit on total data, and you reach it over the web. Amazon EBS gives an EC2 instance a durable block volume that it uses like a hard drive, in the same Availability Zone. Amazon EFS is a shared file system that many instances can use at once and that grows and shrinks automatically.

Amazon S3: object storage

Amazon S3 stores data as objects inside buckets. An object is a file plus metadata that describes it. Each object has a key, the unique identifier for the object within the bucket.

The total volume of data and number of objects you can store in S3 are unlimited. A single object can be from 0 bytes to 50 TB.

Most S3 storage classes, including S3 Standard, store objects across a minimum of three Availability Zones. S3 One Zone-IA is the exception and keeps data in one zone. Uses include websites, backup and restore, archive, data lakes and analytics.

Amazon EBS and instance store: block storage for EC2

An EBS volume is a durable, block-level storage device that you attach to an EC2 instance and use like a physical hard drive. It persists independently of the instance's running life. Typical uses are an instance's system drive and database storage.

The volume and the instance must be in the same Availability Zone. You can attach several EBS volumes to one instance.

Instance store is different. It is temporary block storage on disks physically attached to the host computer. It suits buffers, caches and scratch data, because its data is deleted when you stop, hibernate or terminate the instance. It has no extra charge beyond the instance.

Amazon EFS: shared file storage

Amazon EFS provides serverless, fully elastic file storage. It grows and shrinks automatically as you add and remove files, so you do not provision capacity.

Many compute services can use one file system at the same time, including Amazon EC2, Amazon ECS, Amazon EKS, AWS Lambda and AWS Fargate. EFS uses the NFS protocol and is not supported on Windows-based EC2 instances.

A Regional file system stores data across multiple Availability Zones, and AWS recommends it. A One Zone file system stores data in a single zone.

Where the exam catches people

  • Believing S3 has a storage size you must provision: total data and number of objects in S3 are unlimited.
  • Believing an EBS volume can attach to an instance in any zone: the volume and the instance must be in the same Availability Zone.
  • Believing instance store keeps data after the instance stops: its data is deleted on stop, hibernate or terminate, so use EBS for data that must persist.
  • Believing EBS is the shared file system for many instances: Amazon EFS is built for that, and grows and shrinks automatically.
  • Believing a bucket name alone finds an object: the object key is the unique identifier for an object within a bucket.

Written from Amazon Web Services's documentation

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. Which AWS service would let a company store an unlimited volume of data as objects?

    Right. In the game that’s Renown for your Cloud Technology and Services building.

    Not that one: D is right. In the game your Cloud Technology and Services building would lose a little Renown, and this question would come back later.

  2. Which AWS service would provide durable volumes that an Amazon EC2 instance uses like a physical hard drive?

    Right. In the game that’s Renown for your Cloud Technology and Services building.

    Not that one: B is right. In the game your Cloud Technology and Services building would lose a little Renown, and this question would come back later.

  3. Which of the following must an Amazon EBS volume share with the Amazon EC2 instance it attaches to?

    Right. In the game that’s Renown for your Cloud Technology and Services building.

    Not that one: D is right. In the game your Cloud Technology and Services building would lose a little Renown, and this question would come back later.