Sub topic 10
Storage scope: what is regional and what is zonal
This chapter assumes you know what an Availability Zone (AZ) is, how a VPC spans a Region, and the basics of EC2 and the AWS CLI. The question here is simple. For each storage service, does it live in one AZ, or does AWS spread it across several for you? A wrong answer is a hidden single point of failure.
Why scope matters
Storage is where a multi-AZ design most often breaks. You can run instances in three AZs behind a load balancer, but if every instance depends on a volume in one AZ, losing that AZ takes the whole tier down.
Two terms help here:
- Zonal means the resource lives in one AZ. If that AZ fails, the resource is unavailable or at risk.
- Regional means the service stores data across multiple AZs in a Region. You do not choose zones, and the loss of one AZ does not interrupt access.
Scope also has a limit. A regional service protects you from an AZ failure. It does not protect you from a whole-Region event, from accidental deletes, or from a bad write that corrupts your data.
Scope by service
| Service or resource | Scope | What happens if one AZ fails |
|---|---|---|
| Amazon S3 (Standard, Standard-IA, Glacier classes) | Regional, data stored across at least three AZs | Reads and writes continue |
| Amazon S3 One Zone-IA | Zonal | Data is unavailable, and can be lost if the AZ is destroyed |
| Amazon EFS Standard | Regional | File system stays available through mount targets in other AZs |
| Amazon EFS One Zone | Zonal | File system is unavailable |
| Amazon EBS volume | Zonal | Volume is unavailable until the AZ recovers |
| EBS snapshot | Regional (stored in S3) | Snapshot is still usable |
| EC2 instance store | Zonal, tied to one host | Data is lost when the instance stops or the host fails |
| Amazon DynamoDB | Regional | Table stays available |
| Amazon FSx | Varies by deployment type (Single-AZ or Multi-AZ) | Depends on the type you chose |
Check current AWS documentation for the exact durability and availability figures of each S3 storage class. The scope in the table is the stable part.
Amazon S3
S3 stores objects redundantly across multiple AZs in the Region, except for the One Zone classes. For most workloads you do not configure anything to get AZ-level resilience.
Two points trip people up:
- The S3 bucket namespace is global, but the data is in one Region. A bucket in
us-east-1does not survive a Region-wide problem unless you add replication. - One Zone-IA is cheaper because it uses one AZ. Use it only for data you can re-create, such as a secondary copy or derived data.
Versioning protects against overwrites and deletes. It does not add AZ redundancy, since Standard already has that.
Amazon EBS: the common zonal trap
An EBS volume exists in exactly one AZ, and it can attach only to instances in that same AZ. EBS keeps replicas of the volume inside that AZ to protect against hardware failure, but those replicas do not cover the loss of the AZ.
This has a direct design consequence. An instance cannot fail over to another AZ and reattach its old volume. The volume is in the failed zone.
You can see the AZ of a volume with the CLI:
aws ec2 describe-volumes \
--query 'Volumes[].[VolumeId,AvailabilityZone,State]' \
--output tableTo make EBS-backed data recoverable in another AZ, use snapshots. A snapshot is stored regionally, and you can create a new volume from it in any AZ in the Region:
aws ec2 create-snapshot \
--volume-id "$VOLUME_ID" \
--description "nightly backup"
aws ec2 create-volume \
--snapshot-id "$SNAPSHOT_ID" \
--availability-zone us-east-1b \
--volume-type gp3Snapshots are point-in-time copies. Anything written after the last snapshot is lost if you recover from it, so your snapshot frequency sets your recovery point objective (RPO) for that data.
Design rules for EBS
- Treat EBS volumes as disposable replicas of a regional source of truth when you can. Boot volumes built from an AMI are an example, because the AMI is regional.
- Keep state that must survive an AZ loss in a regional or replicated service: a Multi-AZ database, S3, EFS, or DynamoDB.
- If an application writes to local disk, replicate at the application layer (for example database replication) or snapshot on a schedule that matches your RPO.
- Use Amazon Data Lifecycle Manager or AWS Backup to automate snapshots, so they do not depend on someone remembering.
Amazon EFS
EFS Standard stores data across multiple AZs and exposes it through mount targets. A mount target is a network endpoint in a subnet. You create one per AZ, and instances mount the one in their own AZ.
If you create mount targets in only one AZ, instances in other AZs can still reach the file system over the network in some configurations, but that path depends on the one AZ. Create a mount target in every AZ you use.
aws efs create-mount-target \
--file-system-id "$FS_ID" \
--subnet-id "$SUBNET_A_ID" \
--security-groups "$EFS_SG_ID"
aws efs create-mount-target \
--file-system-id "$FS_ID" \
--subnet-id "$SUBNET_B_ID" \
--security-groups "$EFS_SG_ID"EFS One Zone stores data in one AZ and costs less. It is a fit for development environments or data you can rebuild. It is not a fit for the shared state of a production tier that must survive an AZ loss.
Instance store
Instance store volumes are physically attached to the host. They are fast, and they are ephemeral. The data is gone if the instance stops, is terminated, or the host fails. Use them for caches, scratch space, and buffers, and never for the only copy of anything.
Seeing the scope in an architecture
The diagram shows a three-tier layout, with each storage choice placed in the zone it actually occupies.
Common errors
- Assuming "EBS is replicated" means multi-AZ. The replication is within one AZ.
- Forgetting that a replacement instance starts empty. An Auto Scaling group launches a new instance in a healthy AZ, but it has no access to the failed AZ's volumes. If the instance needs data, it must pull it from a regional source at boot.
- Choosing One Zone classes for production data by cost alone. The savings are real. The data is also in one failure domain.
- Relying on snapshots you never restored. A backup you have not tested is an assumption. Restore one into a different AZ and confirm the application starts.
- Confusing durability with availability. S3 One Zone-IA is highly durable against disk failure, but it is not available during an AZ outage.
- Treating multi-AZ as a backup. A delete or a corrupt write replicates to every copy. Use versioning, snapshots, or AWS Backup with retention for that risk.
A quick audit
To find zonal storage in an account, list the volumes by AZ and check what depends on them. Then ask, for each one, where the data would come from if the AZ vanished. If the answer is "nowhere," that volume is a single point of failure, and you should either replicate it, snapshot it, or move the state to a regional service.
Exercise
An Auto Scaling group spans three AZs. Each instance keeps user uploads on an attached EBS volume. AZ 2 fails. What is lost or unavailable, and how would you change the design?
Show answer
The uploads on the EBS volumes in AZ 2 are unavailable until the AZ recovers, and the group's replacement instances in AZ 1 and AZ 3 start without them. Move the uploads to a regional service such as S3 (or EFS Standard if a shared file system is required), so any instance in any AZ can read them. Keep EBS only for the operating system and disposable data, and snapshot anything that must stay on EBS.
Exercise
You create EFS mount targets in only one of the three AZs your application uses. Why is this a weak design, and what should you do?
Show answer
Instances in the other AZs depend on the mount target in the one AZ, so that AZ becomes a single point of failure for file access even though the file system data itself is regional. Create one mount target in each AZ you use, and have each instance mount the target in its own AZ.