This lesson combines 2 topics: S3 Advanced & Storage Gateway, EBS, EFS, FSx Deep Dive.
Learning Objectives
- Understand advanced S3 features
- Master S3 Access Points and Object Lambda
- Know the Storage Gateway use cases
- Choose the right EBS volume type by IOPS/throughput/cost and understand Multi-Attach
- Understand EFS storage classes and performance/throughput modes
- Choose the right FSx variant by protocol and workload (Windows/HPC/NetApp/OpenZFS)
Part 1: S3 Advanced & Storage Gateway
1. S3 Access Points
Multi-Region Access Points
2. S3 Object Lambda
3. S3 Batch Operations
For bulk operations on billions of objects:
Supported Operations:
- Copy objects
- Invoke Lambda function
- Replace tags
- Replace ACL
- Restore from Glacier
- Object Lock retention
- Replication (S3 Batch Replication)
Input: S3 Inventory report or CSV manifest
4. Storage Gateway
Types
5. S3 Pre-signed URLs
How it works: the URL contains a SigV4 signature + expiration → anyone holding the URL can GET/PUT that object without AWS credentials, within the allowed period.
Key points for the exam:
- The URL inherits the permissions of the principal that signed it. If the signer does not have
s3:GetObjecton that object → the generated URL is still syntactically valid but useless (Access Denied). - Maximum validity is 7 days with SigV4 when signed with IAM user credentials (long-term access keys).
- Common exam trap: signing with temporary credentials (IAM Role — EC2 instance profile, Lambda execution role, STS AssumeRole) → the URL dies when the session token expires, even if you set a longer expiration. Need a long-lived URL → sign with IAM user credentials (or extend the session).
- Per-object: each URL allows exactly 1 operation (GET or PUT) on exactly 1 object key.
Use cases:
- Direct upload from the client: a browser/mobile app PUTs straight to S3, bypassing the app server → less load, lower bandwidth cost through the server.
- Time-limited sharing of private files: send a download link that expires after X hours without making the bucket public.
S3 Pre-signed URL vs CloudFront Signed URL/Cookies
| Criterion | S3 Pre-signed URL | CloudFront Signed URL/Cookies |
|---|---|---|
| Path | Accesses S3 directly | Through the CDN (edge caching, low latency) |
| Origin | S3 only | S3 or a custom origin (ALB, EC2, on-prem) |
| Scope | Per-object, per-operation (GET/PUT) | Signed URL: per-file; Signed Cookies: MANY files (Resource pattern such as /videos/*) |
| Key management | No dedicated key — signed with IAM credentials, easy to generate (SDK/CLI) | Key groups (public/private key pair that you manage and rotate) |
| Conditions | Expiration only | Expiration + IP range restriction, date range (custom policy) |
| Upload | Supports PUT (direct upload) | Mainly for content distribution (download/streaming) |
Exam keywords:
- "serve private content through CDN", "video streaming of many files to subscribers" → CloudFront Signed URL/Cookies (many files → Signed Cookies)
- "temporary direct upload/download to S3", "client upload without going through the server" → S3 Pre-signed URL
6. Advanced CloudFront for SAP-C02
Origin Groups (Origin Failover)
- Origin Group = primary + secondary origin; CloudFront fails over when the primary returns configurable HTTP status codes (500, 502, 503, 504, and 403/404 if selected) or on timeout/connection failure.
- Classic SAP-C02 pattern: Origin Group + S3 Cross-Region Replication → multi-Region HA origin for static content, no Route 53 failover needed, no client changes needed.
- Applies only to GET/HEAD/OPTIONS (no failover for PUT/POST).
Geo Restriction
- Blocks/allows access to a distribution by country (GeoIP database) — configured as an allowlist OR blocklist at the distribution level.
- Use case: compliance/licensing — content may only be released in certain countries (film rights, legal regulations).
- Blocked viewers receive HTTP 403 (a custom error page is possible).
- Distinguish from Route 53 Geolocation routing: Route 53 routes users to different endpoints by location (they are still served, only the destination differs); CloudFront Geo Restriction blocks access entirely. "Block users from country X" → CloudFront Geo Restriction; "serve different content/endpoint per region" → Route 53 Geolocation.
Price Class
| Price Class | Edge locations | Trade-off |
|---|---|---|
| All | All of them (including South America, Australia...) | Best performance everywhere, highest cost |
| 200 | Most regions (excluding the most expensive ones) | Balanced |
| 100 | Only US, Canada, Europe (+ Israel) | Cheapest, users outside US/EU get higher latency |
- Price Class only limits the edge locations that serve content — users in excluded regions can still access it (routed to a farther edge), just more slowly.
- Exam keyword: "reduce CloudFront cost", "users mostly in US/EU" → Price Class 100.
Part 2: EBS, EFS, FSx Deep Dive
1. EBS Volume Types
Multi-Attach (io1/io2)
- Attach the same volume to up to 16 instances
- Same AZ only
- Cluster-aware file system required (GFS2)
- Use case: HA applications
2. EBS Snapshots
Fast Snapshot Restore (FSR):
- Eliminate initialization latency
- Per AZ fee
- Good for: Boot volumes, AMIs
Snapshot Archive:
- 75% cost savings
- 24-72 hours retrieval
- Good for: Compliance, long-term backup
3. EFS (Elastic File System)
Lifecycle management moves files based on their last access time in Standard: for example "after 30 days → IA, after 90 days → Archive", and you can enable "transition back to Standard on first access". EFS Archive is only available on Regional file systems (One Zone does not support it), has a 90-day minimum storage charge, is up to 50% cheaper than IA, and only works with Elastic throughput — once the lifecycle includes a step into Archive, you cannot switch to Bursting/Provisioned. Exam keyword: "rarely accessed file share data, keep it on NFS, most cost-effective" → lifecycle to EFS Archive (no need to move it to S3).
4. FSx Options
| Service | Protocol | Use Case |
|---|---|---|
| FSx for Windows | SMB | Windows apps, AD integration |
| FSx for Lustre | Lustre | HPC, ML, video processing |
| FSx for NetApp ONTAP | NFS, SMB, iSCSI | Enterprise, hybrid |
| FSx for OpenZFS | NFS | Linux workloads |
FSx for Lustre + S3
5. Amazon Data Lifecycle Manager (DLM)
Automates the lifecycle of EBS snapshots and EBS-backed AMIs: creates them on a schedule, keeps them per a retention rule, deletes them on expiry — no custom Lambda/cron needed.
What a Professional needs to know:
- Tag-based: apply standardized tags (via an Organizations tag policy) → new volumes are backed up automatically, no policy changes needed.
- Cross-account copy: a policy in the source account shares snapshots with the DR account; the destination account can have its own policy to copy further cross-Region + re-encrypt with the destination account's KMS key — a DR/backup isolation pattern.
- DLM is free — you only pay for snapshot storage (and FSR if enabled).
DLM vs AWS Backup
| Criterion | DLM | AWS Backup |
|---|---|---|
| Scope | Only EBS snapshots + EBS-backed AMIs | Multi-service: EBS, EC2, RDS, Aurora, DynamoDB, EFS, FSx, S3, Storage Gateway, VMware... |
| Policy | Simple: tag + schedule + retention | Centralized backup plan, backup vault |
| Compliance | No | Vault Lock (WORM), auditing via Backup Audit Manager |
| Cross-region/account | Snapshot copy (EBS only); cross-account copy via snapshot sharing, no Organizations required | Yes, for every supported service; cross-account copy requires the accounts to be in the same AWS Organization |
| Organizations | Not directly | Backup policies applied across the Organization |
| Cost | Free (pay for snapshots) | Pay for backup storage/restore (some services have separate fees) |
Exam keywords:
- "automate EBS snapshot lifecycle", "delete snapshots older than N days", "least effort for EBS only" → DLM
- "centralized backup across multiple services/accounts", "compliance/immutable backup", "enforce backup policy across the Organization" → AWS Backup (+ Vault Lock)
6. EFS Access Points
Access Point = a per-application entry point into an EFS file system:
- Enforce POSIX identity: every request through the access point runs with a preconfigured user/group ID — ignoring the NFS client's identity (even root on the client is mapped to the access point's UID/GID).
- Dedicated root directory (chroot-style): each app only sees its own directory (e.g.
/app1), created automatically with a predefined owner/permissions. - Combine with a file system policy (IAM resource policy) using the condition
elasticfilesystem:AccessPointArn→ forces an app/role to access only through a specific access point, not mount the root directly.
Main use cases:
- Multi-tenant shared EFS: many teams/apps share 1 file system but isolate data + identity — no need to manage UID/GID on each client.
- Lambda + EFS: Lambda must mount EFS through an access point (it cannot mount the file system directly) — used for large ML models, shared state between invocations, libraries larger than the /tmp limit.
- Least privilege: a file system policy denies all access that does not go through an access point → each app can only read/write its own directory.
Exam keywords: "multiple applications share one EFS with isolated directories", "enforce POSIX permissions regardless of client", "Lambda needs shared persistent storage" → EFS Access Points.
Review Questions
-
What problem do S3 Access Points solve?
Show answer
S3 Access Points solve complex bucket policies when many teams/applications need to access the same bucket with different permissions. Instead of one giant bucket policy: create an Access Point per use case with its own policy (e.g. an AP for the analytics team, an AP for the app team, an AP for data science). Each AP has its own hostname and its own policy. They also support VPC restriction (an AP accessible only from a specific VPC).
-
How do Multi-Region Access Points work?
Show answer
MRAP provides a single global endpoint that routes requests to the nearest S3 bucket (lowest latency). You need S3 CRR (Cross-Region Replication) between the buckets to sync data. When a request reaches the MRAP endpoint → AWS routes it to the bucket in the Region with the lowest latency. If a Region fails → automatic failover to the next best Region. Use it for: global apps that need low-latency reads, active-active multi-region storage architectures.
-
What is S3 Object Lambda used for?
Show answer
S3 Object Lambda lets you add transformation code to S3 GET requests — without copying data. A Lambda function intercepts the S3 request and transforms the response before returning it to the client. Use cases: (1) Data redaction (mask PII based on user permissions), (2) Format conversion (CSV → JSON, resize images), (3) Add watermarks, (4) Decompress/uncompress on-the-fly. No storage changes needed — transformation happens per real-time request.
-
What are the 4 types of Storage Gateway?
Show answer
(1) S3 File Gateway: NFS/SMB file shares backed by S3 — on-premises apps access S3 objects as files, (2) FSx File Gateway: local caching for FSx for Windows — on-premises SMB access with caching (SMB only, no NFS support), (3) Volume Gateway: iSCSI block storage backed by S3 — Stored (local primary + S3 backup) or Cached (S3 primary + local cache), (4) Tape Gateway: virtual tape library (VTL) backed by S3 Glacier — replaces physical tapes for backup software. Suited to hybrid cloud storage scenarios.
-
A Lambda function generates a pre-signed URL with a 3-day expiration, but the URL dies after a few hours. Why, and how do you fix it?
Show answer
Lambda signs the URL with temporary credentials from its execution role (STS session token) → the URL expires when the session token expires (usually a few hours), regardless of the expiration you set. Fix: sign the URL with IAM user credentials (long-term access keys, stored in Secrets Manager) if you need the URL to live up to 7 days (the SigV4 maximum), or redesign so the client requests a new URL when needed (short-lived URLs are usually safer). This is a classic exam trap about pre-signed URLs.
-
When should you use CloudFront Signed Cookies instead of an S3 Pre-signed URL?
Show answer
Use CloudFront Signed Cookies when you need to serve private content through a CDN and users need to access MANY files (e.g. HLS video streaming with hundreds of segment files, a members-only area of a website) — 1 cookie covers a whole resource pattern (
/videos/*), takes advantage of edge caching, can restrict IP/date range via a custom policy, and works with custom origins too. Use an S3 Pre-signed URL when you need temporary direct access to 1 specific object in S3 — especially direct upload (PUT) from the client bypassing the app server, or sharing 1 download file for a limited time. Keyword "through CDN / many files" → CloudFront signed; "direct upload / 1 temporary object" → pre-signed. -
When should you choose gp3 over io2?
Show answer
gp3: baseline 3,000 IOPS/125 MBps, provision more independently of size up to 80,000 IOPS and 2,000 MiB/s, volumes up to 64 TiB (raised 09/2025) — ~20% cheaper than gp2 and enough for most workloads. io2 (Block Express): when you need consistent sub-ms latency, 99.999% durability, Multi-Attach, or > 80,000 IOPS on a single volume — demanding database tiers (SAP HANA, Oracle, SQL Server). Exam keyword: "most cost-effective, 10,000 IOPS" → gp3 (no need for io2); "sub-millisecond latency / 99.999% durability / > 80,000 IOPS single volume" → io2 Block Express.
-
What are the constraints of EBS Multi-Attach?
Show answer
Only io1/io2, at most 16 instances, all in the same AZ, and it needs a cluster-aware file system (GFS2...) — regular ext4/XFS will get corrupted because writes are not coordinated. Multi-Attach is not a general shared file storage solution: to share files across AZs/many instances → EFS; Windows → FSx for Windows. This is a common exam trap.
-
EFS Elastic vs Provisioned vs Bursting throughput?
Show answer
Bursting: throughput proportional to storage size (burst credits) — small file systems easily run out of credits. Provisioned: fixed at the level you pay for, for workloads that need high throughput but have little data. Elastic (the new default, recommended): scales automatically with the workload, pay-per-use — choose it when traffic is unpredictable, "least operational overhead". The IA class + Lifecycle management cuts the cost of rarely accessed files by ~92%.
-
Which scenario calls for FSx for NetApp ONTAP instead of EFS?
Show answer
When you need: multi-protocol (NFS + SMB + iSCSI on the same data), NetApp features (SnapMirror replication from on-prem NetApp — the fastest migration path, snapshots, cloning, dedup/compression), or Windows + Linux clients accessing the same data. EFS is NFS/Linux only. FSx for OpenZFS for pure-Linux NFS needing low latency; FSx for Windows for SMB + AD; Lustre for HPC scratch + S3 integration.
- When do you choose DLM, and when AWS Backup?
Show answer
DLM: you only need to automatically create/keep/delete EBS snapshots or EBS-backed AMIs by tag + schedule — free, simple, "least effort" for EBS alone. AWS Backup: you need centralized multi-service backup (EBS, RDS, DynamoDB, EFS, FSx, S3...), cross-account/cross-region, or compliance — backup vault + Vault Lock (WORM), backup policies applied through Organizations. Exam: "automate EBS snapshot lifecycle" → DLM; "centralized/immutable backup across services and accounts" → AWS Backup.
- What problem does an EFS Access Point solve in a multi-tenant architecture?
Show answer
Each app/tenant mounts through its own access point: it is forced to a preconfigured POSIX UID/GID (ignoring the NFS client's identity — even root on the client is remapped) and is chrooted into its own root directory — isolating data on the same EFS without managing permissions on each client. Combine with a file system policy (IAM) with a condition on the Access Point ARN to force each role into its own access point only. Note: Lambda must mount EFS through an access point.
Hands-on Exercises
Part 1: S3 Advanced & Storage Gateway
-
Multi-tenant S3 Access Point: create a bucket with 2 prefixes (
/finance/,/analytics/), create 2 Access Points with policies limited by prefix and 1 AP restricted by VPC. Verify with the CLI (--endpointvia the AP alias) that each AP can only read its own prefix. -
S3 Object Lambda redaction: create an Object Lambda Access Point with a Lambda function that masks email/phone number fields in a JSON file on GET. Compare the response through a regular AP vs the Object Lambda AP — the original data in the bucket is unchanged.
-
S3 Batch Operations: enable S3 Inventory for a bucket that already has a few hundred objects, and use the inventory report as the manifest to run a Batch Operations job that replaces tags in bulk. Review the completion report to understand how partial failures are handled.
Part 2: EBS, EFS, FSx Deep Dive
-
gp2 → gp3 migration: create a 100GB gp2 volume, modify it to gp3 (elastic volume, no downtime), and raise IOPS to 6,000 independently of size — compare the monthly cost of the 2 configurations with the pricing calculator.
-
EFS multi-AZ mount: create EFS + mount targets in 2 AZs, mount it from 2 EC2 instances in different AZs, write a file from one instance and read it from the other; enable a lifecycle policy that transitions to IA after 7 days.
-
FSx for Lustre + S3: create an FSx for Lustre scratch file system linked to an S3 bucket, verify lazy-loading of objects from S3 through the file system, and export back (
lfs hsm_archive) to S3.
References
- S3 Access Points
- S3 Object Lock
- S3 Select
- S3 Batch Operations
- Sharing objects with presigned URLs
- CloudFront serving private content (Signed URLs/Cookies)
- CloudFront origin failover (Origin Groups)
- CloudFront geographic restrictions
- CloudFront Price Classes
- Amazon EBS User Guide
- gp3 up to 64 TiB / 80,000 IOPS / 2,000 MiB/s (09/2025)
- Amazon EFS User Guide
- Amazon FSx Documentation
- Amazon Data Lifecycle Manager
- EFS Access Points
- EFS storage classes (Standard, IA, Archive)
- EFS lifecycle management