Sub topic 4
Global, regional, and zonal resources
Every AWS resource has a scope. The scope decides where the resource exists, which API endpoint you call to manage it, which console view shows it, and what can break it. This chapter assumes you know what a Region and an Availability Zone (AZ) are, and that you can run the AWS CLI with working credentials. It does not assume you have built a multi-AZ system.
The three scopes
- Global: one logical resource that is not tied to a Region you pick. You do not choose a Region when you create it.
- Regional: the resource lives in one Region. It is invisible to API calls and console views for other Regions.
- Zonal: the resource lives in one AZ inside one Region. You choose the AZ at creation, and it cannot be changed.
The scope is a property of the service's design, not a setting. A VPC is regional because AWS built it that way. A subnet is zonal for the same reason. You can only learn the scope from the documentation, from the console, or from the shape of the resource's ARN.
Global resources
Global resources are available the same way from every Region. Common examples:
- IAM users, groups, roles, and policies.
- Route 53 hosted zones and records.
- CloudFront distributions.
- AWS Organizations accounts and policies.
- Billing and Cost Management data for the whole account.
In the console, these services show "Global" in the Region selector instead of a Region name.
What "global" does not mean
Global does not mean the service runs everywhere with no dependency on a Region. For several global services the control plane, which is the API you use to create and change resources, is served from a single Region. IAM and Route 53 changes, for example, go through us-east-1. The data plane, which handles requests such as authenticating a call or answering a DNS query, runs in many places and keeps working if that control plane has a problem.
For design, this means two things. You can usually count on existing global resources to keep working. You should not count on being able to change them during a large us-east-1 event.
Global services with a regional catch
Some resources that look global have regional parts:
- S3 bucket names are unique across all AWS accounts in a partition, but each bucket is created in one Region. The console lists your buckets from all Regions in one view, which hides this.
- ACM certificates for CloudFront must be requested in us-east-1, even though the distribution is global.
- WAF web ACLs that protect CloudFront also use us-east-1 and the "CLOUDFRONT" scope.
- IAM Identity Center is deployed into one Region that you choose.
Regional resources
Most services are regional. You create the resource in a Region, and it exists only there. Common examples:
- VPCs, internet gateways, route tables, and security groups. A security group belongs to a VPC, so it is regional.
- S3 buckets and their objects.
- Lambda functions, DynamoDB tables, SQS queues, and SNS topics.
- AMIs, EBS snapshots, key pairs, and Elastic IP addresses.
- KMS keys. A key in one Region cannot decrypt data under a key in another, unless you use multi-Region keys.
- Load balancers, which span the AZs you attach to them but are regional objects.
Regional scope has a practical consequence: a resource ID from one Region means nothing in another. Run the same query against two Regions and you get two different answers.
aws ec2 describe-instances --region us-east-1 \
--query "Reservations[].Instances[].InstanceId" --output text
aws ec2 describe-instances --region eu-west-1 \
--query "Reservations[].Instances[].InstanceId" --output textIf the second command returns nothing, your instances are not missing. They are in the other Region.
Reading scope from an ARN
An Amazon Resource Name (ARN) has the form arn:partition:service:region:account-id:resource. The region and account fields tell you the scope.
| Resource | Example ARN | What the empty or present fields mean |
|---|---|---|
| IAM role (global) | `arn:aws:iam::123456789012:role/app-role` | Region field is empty. |
| S3 bucket | `arn:aws:s3:::my-bucket-name` | Region and account are both empty because the name is globally unique. |
| EC2 instance (zonal) | `arn:aws:ec2:us-east-1:123456789012:instance/i-0abc` | Region is present. The AZ is not in the ARN. |
| Lambda function (regional) | `arn:aws:lambda:eu-west-1:123456789012:function:orders` | Region is present. |
The ARN of a zonal resource shows only the Region. The AZ is an attribute you read from the resource itself, not from its ARN.
Zonal resources
A zonal resource is pinned to a single AZ. Common examples:
- Subnets. Each subnet is in exactly one AZ, and a VPC spans many.
- EC2 instances, which run in the AZ of the subnet you launch them into.
- EBS volumes, which can attach only to instances in the same AZ.
- NAT gateways, which live in one subnet and therefore one AZ.
- EFS mount targets. The file system itself is regional, but each mount target sits in one AZ.
- Single-AZ RDS instances, whose standby is absent until you enable Multi-AZ.
The most useful rule: a zonal resource fails with its AZ. If you put your only instance, volume, and NAT gateway in one AZ, one AZ event takes the workload down.
EBS volumes show the constraint
An EBS volume is created in one AZ and cannot be attached across AZs.
aws ec2 create-volume \
--availability-zone us-east-1a \
--size 8 \
--volume-type gp3If you then try to attach this volume to an instance in us-east-1b, the call fails with InvalidVolume.ZoneMismatch. You do not move a volume. You snapshot it, which is stored regionally, and create a new volume from the snapshot in the target AZ.
aws ec2 create-snapshot --volume-id vol-0123456789abcdef0
aws ec2 create-volume \
--snapshot-id snap-0123456789abcdef0 \
--availability-zone us-east-1b \
--volume-type gp3Both IDs above are placeholders. Replace them with the IDs from your own output.
Seeing scope in the console
The console shows only one Region at a time for regional and zonal services. Two things catch learners:
- You create a resource, switch Region, and it "disappears". It is still there.
- A global service works from any Region, so the selector makes no difference to it.
The S3 console is a special case, because it shows buckets from all Regions together. Each bucket still has one Region, shown as a column in the list.
Finding resources across Regions
Because regional resources are hidden from other Regions, a forgotten instance in a Region you rarely use can keep running and keep billing. A short script that loops over the enabled Regions finds stray compute.
import boto3
session = boto3.session.Session()
ec2 = session.client("ec2", region_name="us-east-1")
regions = [r["RegionName"] for r in ec2.describe_regions()["Regions"]]
for region in regions:
client = session.client("ec2", region_name=region)
paginator = client.get_paginator("describe_instances")
live = 0
for page in paginator.paginate():
for reservation in page["Reservations"]:
for instance in reservation["Instances"]:
if instance["State"]["Name"] != "terminated":
live += 1
print(f"{region}: {live} instance(s) not terminated")describe_regions returns only enabled Regions, so opt-in Regions you have not enabled are skipped. This script checks EC2 only. Volumes, NAT gateways, Elastic IPs, and load balancers need their own calls per Region.
Scope and failure
The scope tells you the size of the failure it can suffer.
| Scope | Typical blast radius | Common mitigation |
|---|---|---|
| Zonal | One AZ | Run copies in at least two AZs. |
| Regional | One Region | Replicate data and keep a standby in a second Region if the workload needs it. |
| Global | Control plane in one Region, data plane widely distributed | Avoid depending on control-plane changes during an incident. |
A regional resource such as a VPC survives the loss of one AZ, but only the parts you spread across AZs keep serving. A subnet, an instance, and a NAT gateway placed in the failed AZ do not.
Common errors
- Querying the wrong Region. An empty result usually means the wrong Region, not a missing resource. Check
aws configure get regionand the--regionflag. - Creating a resource, then looking in the wrong console view. Check the Region selector first.
- Single-AZ dependencies in a multi-AZ design. One NAT gateway in one subnet makes every private subnet depend on that AZ.
- Cross-Region references. A Lambda function cannot use a security group from a VPC in another Region. A KMS key in one Region cannot be used by a service in another.
- Assuming global means editable anywhere. Changes to IAM and Route 53 still depend on a specific Region's control plane.
Exercise
You create an EBS volume in us-east-1a and need the same data in an instance running in us-east-1b. What do you do, and why can you not attach the volume directly?
Show answer
An EBS volume is a zonal resource, so it can attach only to instances in its own AZ, and a cross-AZ attach fails with InvalidVolume.ZoneMismatch. Create a snapshot of the volume. Snapshots are regional, so they are usable in any AZ of that Region. Then create a new volume from the snapshot with --availability-zone us-east-1b and attach it to the instance.
Exercise
Classify each as global, regional, or zonal: an IAM role, a subnet, a DynamoDB table, a security group, a Route 53 hosted zone, an EC2 instance. Which ARN field would be empty for the IAM role?
Show answer
Global: the IAM role and the Route 53 hosted zone. Regional: the DynamoDB table and the security group (it belongs to a VPC, which is regional). Zonal: the subnet and the EC2 instance. The IAM role's ARN has an empty Region field, as in arn:aws:iam::123456789012:role/app-role.