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.
Choose from API, disk and shared-path requirements, then check AZ placement, concurrent writes and retained data.
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.
- Report app → S3: finished PDFsStore PDFs by API
- Report app → EBS: EC2 diskNeeds a disk
- 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
| Question | S3 | EBS | EFS |
|---|---|---|---|
| Application access | Object API and key | Block device attached to EC2 | File paths mounted through NFS |
| Example fit | Store/retrieve a completed PDF by key | An OS or database needs a disk | Multiple clients need one shared directory |
| Placement check | Region and storage class | EC2 and volume in the same AZ | Regional/One Zone and mount targets |
| Sharing check | Permissions and updates to a key | Multi-Attach support and coordinated writes | NFS 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.
| Requirement | Candidate | Reason |
|---|---|---|
| A: completed PDFs stored/retrieved by key and API | S3 | The application supports object APIs; no shared mount is required. |
| B: software on one EC2 instance requires a dedicated disk | EBS | An OS disk satisfies the stated access model; verify AZ and software support. |
| C: two Linux clients share the same working directory over NFS | EFS | Multiple 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
| Storage | Check | Common omission |
|---|---|---|
| S3 | Current objects, old versions and incomplete uploads | An empty current listing can miss retained versions/parts. |
| EBS | Volumes and snapshots | Stopping EC2 is not volume deletion; inspect termination settings. |
| EFS | File system and recovery copies | Unmounting clients does not delete stored data. |
- Fix the API, block-device or shared-path requirement.
- Check clients, OS support, concurrent writes and locking.
- Review AZ/Region placement, storage class and mount targets.
- Estimate storage, access/processing and transfer for the required workload.
- Identify authorized deletion, retained copies, references and recovery.
Check the access model and conditions
Choose an option to see the result and explanation.
Check, then explain in your own words
- Match S1 requirements to access models.
- Separate attached disks from shared files.
- Explain AZ constraints and Regional/One Zone.
- 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.
- Amazon S3: What is S3?Checked:
Scope and conditionsObject/API access and storage-class distinctions. Documentation review, not live AWS verification.
Used in this lessonStart with how the application reads and writes Compare access and sharing conditions
- Amazon EBS volumesChecked:
Scope and conditionsEC2 block-device access and same-AZ attachment. Documentation review, not live AWS verification.
Used in this lessonStart with how the application reads and writes Compare access and sharing conditions
- What is Amazon EFS?Checked:
Scope and conditionsNFS/POSIX, Regional versus One Zone, and no Windows EC2 support. Documentation review, not live AWS verification.
Used in this lessonStart with how the application reads and writes Compare access and sharing conditions Check AZ boundaries and concurrent writes
- How Amazon EFS worksChecked:
Scope and conditionsMultiple NFS clients, mount targets and placement-dependent access. Documentation review, not live AWS verification.
Used in this lessonCompare access and sharing conditions Check AZ boundaries and concurrent writes
- Amazon EBS Multi-AttachChecked:
Scope and conditionsConditional io1/io2 multi-attachment requires coordinated writes; not an automatic shared file system. Documentation review, not live AWS verification.
Used in this lessonCheck AZ boundaries and concurrent writes
Scope and conditionsAll versions/delete markers, incomplete multipart uploads and ongoing writes. Documentation review, not live AWS verification.
Used in this lessonCheck retention, deletion and cost separately
- What is Amazon EBS?Checked:
Scope and conditionsVolumes versus independent snapshots and resource management. Documentation review, not live AWS verification.
Used in this lessonCheck retention, deletion and cost separately