INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: S3 operations, storage choices and web delivery

S3 vs EBS vs EFS: choose object, block or shared file storage

S3 stores objects through APIs, EBS provides disks attached to EC2, and EFS provides a shared file system. All can hold data, but applications access them differently. Choose per requirement using one fictional internal report application.

What you will learn

Choose from API, disk and shared-path requirements, then check AZ placement, concurrent writes and retained data.

Prerequisite

EC2 provides virtual servers; an Availability Zone is a placement boundary within a Region. A bucket contains S3 objects identified by keys. No account or paid resources are needed.

Start with how the application reads and writes

An object is addressed by key through an API; block storage supplies an OS disk; file storage exposes paths after mounting. Do not assume S3 is an attached EBS disk, or that attaching EBS automatically creates a shared folder.

An API is an interface used by programs. NFS (Network File System) provides file access over a network; mounting exposes file paths to applications. POSIX permissions govern file access for owners, groups and others. IAM permission or network reachability alone does not establish permission to write a file.

Three storage requirements within one report application
Three storage requirements within one report application1: Report app — Store PDFs by API — S3: finished PDFs. 2: Report app — Needs a disk — EBS: EC2 disk. 3: Report app — Shares a file path — EFS: shared path123Report appS3: finished PDFsEBS: EC2 diskEFS: shared pathThree storage requirements within one report application1: Report app — Store PDFs by API — S3: finished PDFs. 2: Report app — Needs a disk — EBS: EC2 disk. 3: Report app — Shares a file path — EFS: shared path123Report appS3: finishedPDFsEBS: EC2 diskEFS: sharedpath
  1. Report app → S3: finished PDFsStore PDFs by API
  2. Report app → EBS: EC2 diskNeeds a disk
  3. Report app → EFS: shared pathShares a file path
Report app
Three separate requirements
S3: finished PDFs
Key-addressed API access
EBS: EC2 disk
Attach within the same AZ
EFS: shared path
NFS from multiple Linux clients

Compare access and sharing conditions

Checks before choosing S3, EBS or EFS
QuestionS3EBSEFS
Application accessObject API and keyBlock device attached to EC2File paths mounted through NFS
Example fitStore/retrieve a completed PDF by keyAn OS or database needs a diskMultiple clients need one shared directory
Placement checkRegion and storage classEC2 and volume in the same AZRegional/One Zone and mount targets
Sharing checkPermissions and updates to a keyMulti-Attach support and coordinated writesNFS access, POSIX permissions and application concurrency

This comparison focuses on general-purpose S3, EBS for EC2, and EFS for Linux/NFS workloads. A file-like adapter does not imply identical API, update or locking semantics. A Windows SMB requirement calls for another supported service rather than forcing one of these three choices.

S1: select for three explicit requirements

S1 supplies three requirements for an internal monthly-report application. They are fictional requirements, not benchmarks or cheapest-price findings. Select for the operations the application needs, rather than the fact that all three workloads contain files.

S1 requirements and reasons
RequirementCandidateReason
A: completed PDFs stored/retrieved by key and APIS3The application supports object APIs; no shared mount is required.
B: software on one EC2 instance requires a dedicated diskEBSAn OS disk satisfies the stated access model; verify AZ and software support.
C: two Linux clients share the same working directory over NFSEFSMultiple NFS clients can use one file system; coordinate application writes separately.

Check AZ boundaries and concurrent writes

EBS Multi-Attach is conditional: supported instances and volumes remain in one AZ, with coordinated writes. Ordinary file systems are not automatically safe for simultaneous access from several servers. Attachment support and coherent shared-file access are different requirements.

EFS Regional stores data across multiple AZs; One Zone stores it in one AZ. Client reachability to a mount target differs from data placement. Accessing One Zone from another AZ does not turn it into multi-AZ storage.

Availability, durability and recovery copies answer different questions. AZ redundancy alone does not undo an accidental deletion or incorrect application write. Define tolerable downtime and data loss, then verify the required recovery method.

Check retention, deletion and cost separately

Separate resources when planning cleanup
StorageCheckCommon omission
S3Current objects, old versions and incomplete uploadsAn empty current listing can miss retained versions/parts.
EBSVolumes and snapshotsStopping EC2 is not volume deletion; inspect termination settings.
EFSFile system and recovery copiesUnmounting clients does not delete stored data.
  1. Fix the API, block-device or shared-path requirement.
  2. Check clients, OS support, concurrent writes and locking.
  3. Review AZ/Region placement, storage class and mount targets.
  4. Estimate storage, access/processing and transfer for the required workload.
  5. Identify authorized deletion, retained copies, references and recovery.

Check the access model and conditions

Choose an option to see the result and explanation.

S1-A retrieves completed PDFs by key through an API. Which candidate fits first?
Read the answer and reason

Answer: S3: the application supports object APIs. · The storage unit and access method match.

S1-C requires one NFS working directory shared by two Linux clients. Which candidate fits?
Read the answer and reason

Answer: Consider EFS, then check access, permissions and concurrency. · It fits shared NFS access; application concurrency still matters.

A client in another AZ reaches EFS One Zone. Is the stored data multi-AZ?
Read the answer and reason

Answer: No; client location and data placement differ. · A client in another AZ does not change the file-system type.

EC2 is stopped. Must EBS and snapshot charges disappear?
Read the answer and reason

Answer: No; inspect retained storage separately. · Volumes and snapshots are separate resources.

Check, then explain in your own words

  1. Match S1 requirements to access models.
  2. Separate attached disks from shared files.
  3. Explain AZ constraints and Regional/One Zone.
  4. List storage resources retained after stopping clients.
Check your understanding: S1-B changes to attaching the same EBS volume directly to EC2 in another AZ. What changes?

That violates same-AZ attachment. Revisit the design, such as a new destination volume restored from a snapshot. A separate restored volume is not shared access to the same live disk.

Check both access semantics and placement, rather than selecting by service name alone.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.