Regions and Zones - Amazon Elastic Compute Cloud

Regions and Zones

Amazon EC2 is hosted in multiple locations world-wide. These locations are composed of Regions, Availability Zones, Local Zones, and Wavelength Zones. Each Region is a separate geographic area.

  • Availability Zones are multiple, isolated locations within each Region.

  • Local Zones provide you the ability to place resources, such as compute and storage, in multiple locations closer to your end users.

  • AWS Outposts brings native AWS services, infrastructure, and operating models to virtually any data center, co-location space, or on-premises facility.

  • Wavelength Zones allow developers to build applications that deliver ultra-low latencies to 5G devices and end users. Wavelength deploys standard AWS compute and storage services to the edge of telecommunication carriers' 5G networks.

AWS operates state-of-the-art, highly available data centers. Although rare, failures can occur that affect the availability of instances that are in the same location. If you host all of your instances in a single location that is affected by a failure, none of your instances would be available.

To help you determine which deployment is best for you, see AWS Wavelength FAQs.

Regions

Each Amazon EC2 Region is designed to be isolated from the other Amazon EC2 Regions. This achieves the greatest possible fault tolerance and stability.

The following diagram illustrates multiple AWS Regions.


				Regions

When you view your resources, you see only the resources that are tied to the Region that you specified. This is because Regions are isolated from each other, and we don't automatically replicate resources across Regions.

When you launch an instance, you must select an AMI that's in the same Region. If the AMI is in another Region, you can copy the AMI to the Region you're using. For more information, see Copying an AMI.

Note that there is a charge for data transfer between Regions. For more information, see Amazon EC2 Pricing - Data Transfer.

Available Regions

Your account determines the Regions that are available to you. For example:

  • An AWS account provides multiple Regions so that you can launch Amazon EC2 instances in locations that meet your requirements. For example, you might want to launch instances in Europe to be closer to your European customers or to meet legal requirements.

  • An AWS GovCloud (US-West) account provides access to the AWS GovCloud (US-West) Region and the AWS GovCloud (US-East) Region. For more information, see AWS GovCloud (US).

  • An Amazon AWS (China) account provides access to the Beijing and Ningxia Regions only. For more information, see AWS in China.

The following table lists the Regions provided by an AWS account. You can't describe or access additional Regions from an AWS account, such as AWS GovCloud (US) Region or the China Regions. To use a Region introduced after March 20, 2019, you must enable the Region. For more information, see Managing AWS Regions in the AWS General Reference.

For information about available Wavelength Zones, see Available Wavelength Zones in the AWS Wavelength Developer Guide.

Code Name Opt-in Status Local Zone
us-east-2 US East (Ohio) Not required Not available
us-east-1 US East (N. Virginia) Not required Not available
us-west-1 US West (N. California) Not required Not available
us-west-2 US West (Oregon) Not required us-west-2-lax-1a

us-west-2-lax-1b

af-south-1 Africa (Cape Town) Required Not available
ap-east-1 Asia Pacific (Hong Kong) Required Not available
ap-south-1 Asia Pacific (Mumbai) Not required Not available
ap-northeast-3 Asia Pacific (Osaka-Local) Not required Not available
ap-northeast-2 Asia Pacific (Seoul) Not required Not available
ap-southeast-1 Asia Pacific (Singapore) Not required Not available
ap-southeast-2 Asia Pacific (Sydney) Not required Not available
ap-northeast-1 Asia Pacific (Tokyo) Not required Not available
ca-central-1 Canada (Central) Not required Not available
eu-central-1 Europe (Frankfurt) Not required Not available
eu-west-1 Europe (Ireland) Not required Not available
eu-west-2 Europe (London) Not required Not available
eu-south-1 Europe (Milan) Required Not available
eu-west-3 Europe (Paris) Not required Not available
eu-north-1 Europe (Stockholm) Not required Not available
me-south-1 Middle East (Bahrain) Required Not available
sa-east-1 South America (São Paulo) Not required Not available

For more information, see AWS Global Infrastructure.

The number and mapping of Availability Zones per Region may vary between AWS accounts. To get a list of the Availability Zones that are available to your account, you can use the Amazon EC2 console or the command line interface. For more information, see Describing your Regions.

Regions and endpoints

When you work with an instance using the command line interface or API actions, you must specify its Regional endpoint. For more information about the Regions and endpoints for Amazon EC2, see Amazon EC2 endpoints and quotas in the Amazon Web Services General Reference.

For more information about endpoints and protocols in AWS GovCloud (US-West), see AWS GovCloud (US-West) Endpoints in the AWS GovCloud (US) User Guide.

Describing your Regions

You can use the Amazon EC2 console or the command line interface to determine which Regions are available for your account. For more information about these command line interfaces, see Accessing Amazon EC2.

To find your Regions using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. From the navigation bar, view the options in the Region selector.

    
							View your Regions
  3. Your EC2 resources for this Region are displayed on the EC2 Dashboard in the Resources section.

To find your Regions using the AWS CLI

  • Use the describe-regions command as follows to describe the Regions that are enabled for your account.

    aws ec2 describe-regions

    To describe all Regions, including any Regions that are disabled for your account, add the --all-regions option as follows.

    aws ec2 describe-regions --all-regions

To find your Regions using the AWS Tools for Windows PowerShell

  • Use the Get-EC2Region command as follows to describe the Regions for your account.

    PS C:\> Get-EC2Region

Getting the Region name

You can use the Amazon Lightsail API to view the name of a Region.

To view the Region name using the AWS CLI

  • Use the get-regions command as follows to describe the name of the specified Region.

    aws lightsail get-regions --query "regions[?name=='region-name'].displayName" --output text

    The following example returns the name of the us-east-2 Region.

    aws lightsail get-regions --query "regions[?name=='us-east-2'].displayName" --output text

    The following is the output:

    Ohio

Specifying the Region for a resource

Every time you create an Amazon EC2 resource, you can specify the Region for the resource. You can specify the Region for a resource using the AWS Management Console or the command line.

Considerations

Some AWS resources might not be available in all Regions. Ensure that you can create the resources that you need in the desired Regions before you launch an instance.

To specify the Region for a resource using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. Use the Region selector in the navigation bar.

To specify the default Region using the command line

You can set the value of an environment variable to the desired Regional endpoint (for example, https://ec2.us-east-2.amazonaws.com):

  • AWS_DEFAULT_REGION (AWS CLI)

  • Set-AWSDefaultRegion (AWS Tools for Windows PowerShell)

Alternatively, you can use the --region (AWS CLI) or -Region (AWS Tools for Windows PowerShell) command line option with each individual command. For example, --region us-east-2.

For more information about the endpoints for Amazon EC2, see Amazon Elastic Compute Cloud Endpoints.

Availability Zones

Each Region has multiple, isolated locations known as Availability Zones. When you launch an instance, you can select an Availability Zone or let us choose one for you. If you distribute your instances across multiple Availability Zones and one instance fails, you can design your application so that an instance in another Availability Zone can handle requests.

The following diagram illustrates multiple Availability Zones in an AWS Region.


				Regions

You can also use Elastic IP addresses to mask the failure of an instance in one Availability Zone by rapidly remapping the address to an instance in another Availability Zone. For more information, see Elastic IP addresses.

An Availability Zone is represented by a Region code followed by a letter identifier; for example, us-east-1a. To ensure that resources are distributed across the Availability Zones for a Region, we independently map Availability Zones to names for each AWS account. For example, the Availability Zone us-east-1a for your AWS account might not be the same location as us-east-1a for another AWS account.

To coordinate Availability Zones across accounts, you must use the AZ ID, which is a unique and consistent identifier for an Availability Zone. For example, use1-az1 is an AZ ID for the us-east-1 Region and it has the same location in every AWS account.

You can view AZ IDs to determine the location of resources in one account relative to the resources in another account. For example, if you share a subnet in the Availability Zone with the AZ ID use-az2 with another account, this subnet is available to that account in the Availability Zone whose AZ ID is also use-az2. The AZ ID for each VPC and subnet is displayed in the Amazon VPC console. For more information, see Working with Shared VPCs in the Amazon VPC User Guide.

As Availability Zones grow over time, our ability to expand them can become constrained. If this happens, we might restrict you from launching an instance in a constrained Availability Zone unless you already have an instance in that Availability Zone. Eventually, we might also remove the constrained Availability Zone from the list of Availability Zones for new accounts. Therefore, your account might have a different number of available Availability Zones in a Region than another account.

Describing your Availability Zones

You can use the Amazon EC2 console or the command line interface to determine which Availability Zones are available for your account. For more information about these command line interfaces, see Accessing Amazon EC2.

To find your Availability Zones using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. From the navigation bar, view the options in the Region selector.

  3. On the navigation pane, choose EC2 Dashboard.

  4. The Availability Zones are listed under Service health, Zone status.

To find your Availability Zones using the AWS CLI

  1. Use the describe-availability-zones command as follows to describe the Availability Zones within the specified Region.

    aws ec2 describe-availability-zones --region region-name
  2. Use the describe-availability-zones command as follows to describe the Availability Zones regardless of the opt-in status.

    aws ec2 describe-availability-zones --all-availability-zones

To find your Availability Zones using the AWS Tools for Windows PowerShell

Use the Get-EC2AvailabilityZone command as follows to describe the Availability Zones within the specified Region.

PS C:\> Get-EC2AvailabilityZone -Region region-name

Launching instances in an Availability Zone

When you launch an instance, select a Region that puts your instances closer to specific customers, or meets the legal or other requirements that you have. By launching your instances in separate Availability Zones, you can protect your applications from the failure of a single location.

When you launch an instance, you can optionally specify an Availability Zone in the Region that you are using. If you do not specify an Availability Zone, we select an Availability Zone for you. When you launch your initial instances, we recommend that you accept the default Availability Zone, because this allows us to select the best Availability Zone for you based on system health and available capacity. If you launch additional instances, specify a Zone only if your new instances must be close to, or separated from, your running instances.

Migrating an instance to another Availability Zone

If necessary, you can migrate an instance from one Availability Zone to another. For example, let's say you are trying to modify the instance type of your instance and we can't launch an instance of the new instance type in the current Availability Zone. In this case, you can migrate the instance to an Availability Zone where we are able to launch an instance of that instance type.

The migration process involves:

  • Creating an AMI from the original instance

  • Launching an instance in the new Availability Zone

  • Updating the configuration of the new instance, as shown in the following procedure

To migrate an instance to another Availability Zone

  1. Create an AMI from the instance. The procedure depends on your operating system and the type of root device volume for the instance. For more information, see the documentation that corresponds to your operating system and root device volume:

  2. If you need to preserve the private IPv4 address of the instance, you must delete the subnet in the current Availability Zone and then create a subnet in the new Availability Zone with the same IPv4 address range as the original subnet. Note that you must terminate all instances in a subnet before you can delete it. Therefore, you should create AMIs from all of the instances in your subnet so that you can move all instances from the current subnet to the new subnet.

  3. Launch an instance from the AMI that you just created, specifying the new Availability Zone or subnet. You can use the same instance type as the original instance, or select a new instance type. For more information, see Launching instances in an Availability Zone.

  4. If the original instance has an associated Elastic IP address, associate it with the new instance. For more information, see Disassociating an Elastic IP address.

  5. If the original instance is a Reserved Instance, change the Availability Zone for your reservation. (If you also changed the instance type, you can also change the instance type for your reservation.) For more information, see Submitting modification requests.

  6. (Optional) Terminate the original instance. For more information, see Terminating an instance.

Local Zones

A Local Zone is an extension of an AWS Region in geographic proximity to your users. Local Zones have their own connections to the internet and support AWS Direct Connect, so resources created in a Local Zone can serve local users with low-latency communications. For more information, see AWS Local Zones.


				Local Zones

A Local Zone is represented by a Region code followed by an identifier that indicates the location, for example, us-west-2-lax-1a.

To use a Local Zone, you must first enable it. For more information, see Enable Local Zones. Next, create a subnet in the Local Zone. Finally, launch any of the following resources in the Local Zone subnet, so that your applications are close to your end users:

  • Amazon EC2 instances

  • Amazon EBS volumes

  • Amazon FSx file servers

  • Application Load Balancers

  • Dedicated Hosts

For information about the available Local Zones, see Available Regions.

Describing your Local Zones

You can use the Amazon EC2 console or the command line interface to determine which Local Zones are available for your account. For more information about these command line interfaces, see Accessing Amazon EC2.

To find your Local Zones using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. From the navigation bar, view the options in the Region selector.

  3. On the navigation pane, choose EC2 Dashboard.

  4. The Local Zones are listed under Service health, Zone status.

To find your Local Zones using the AWS CLI

  1. Use the describe-availability-zones command as follows to describe the Local Zones in the specified Region.

    aws ec2 describe-availability-zones --region region-name
  2. Use the describe-availability-zones command as follows to describe the Local Zones regardless of whether they are enabled.

    aws ec2 describe-availability-zones --all-availability-zones

To find your Local Zones using the AWS Tools for Windows PowerShell

Use the Get-EC2AvailabilityZone command as follows to describe the Local Zones in the specified Region.

PS C:\> Get-EC2AvailabilityZone -Region region-name

Enable Local Zones

Before you can specify a Local Zone for a resource or service, you must enable Local Zones.

Consideration

Some AWS resources might not be available in all Regions. Make sure that you can create the resources that you need in the desired Regions or Local Zones before launching an instance in a specific Local Zone.

To enable Local Zones using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the upper-left corner of the page, select New EC2 Experience. You cannot complete this task using the old console experience.

  3. From the Region selector in the navigation bar, select the Region for the Local Zone.

  4. On the navigation pane, choose EC2 Dashboard.

  5. In the upper-right corner of the page, choose Account attributes, Zones.

  6. Choose Manage.

  7. For Zone group, choose Enabled.

  8. Choose Update zone group.

To enable Local Zones using the AWS CLI

Launching instances in a Local Zone

When you launch an instance, you can specify a subnet which is in a Local Zone. You also allocate an IP address from a network border group, which is a unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses, for example, us-west-2-lax-1a.

You can allocate the following IP addresses from a network border group:

  • Elastic IPv4 addresses that Amazon provides

  • IPv6 Amazon-provided VPC addresses

To launch an instance in a Local Zone:

  1. Enable Local Zones. For more information, see Enable Local Zones.

  2. Create a VPC in a Region that supports the Local Zone. For more information, see Creating a VPC in the Amazon VPC User Guide.

  3. Create a subnet. Select the Local Zone when you create the subnet. For more information, see Creating a subnet in your VPC in the Amazon VPC User Guide.

  4. Launch an instance, and select the subnet you created in the Local Zone. For more information, see Launch your instance.

Wavelength Zones

AWS Wavelength enables developers to build applications that deliver ultra-low latencies to mobile devices and end users. Wavelength deploys standard AWS compute and storage services to the edge of telecommunication carriers' 5G networks. Developers can extend a virtual private cloud (VPC) to one or more Wavelength Zones, and then use AWS resources like Amazon EC2 instances to run applications that require ultra-low latency and a connection to AWS services in the Region.

A Wavelength Zone is an isolated zone in the carrier location where the Wavelength infrastructure is deployed. Wavelength Zones are tied to a Region. A Wavelength Zone is a logical extension of a Region, and is managed by the control plane in the Region.


				Wavelength Zones

A Wavelength Zone is represented by a Region code followed by an identifier that indicates the Wavelength Zone, for example, us-east-1-wl1-bos-wlz-1.

To use a Wavelength Zone, you must first opt in to the Zone. For more information, see Enable Wavelength Zones. Next, create a subnet in the Wavelength Zone. Finally, launch your resources in the Wavelength Zones subnet, so that your applications are closer to your end users.

Wavelength Zones are not available in every Region. For information about the Regions that support Wavelength Zones, see Available Wavelength Zones in the AWS Wavelength Developer Guide.

Describing your Wavelength Zones

You can use the Amazon EC2 console or the command line interface to determine which Wavelength Zones are available for your account. For more information about these command line interfaces, see Accessing Amazon EC2.

To find your Wavelength Zones using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. From the navigation bar, view the options in the Region selector.

  3. On the navigation pane, choose EC2 Dashboard.

  4. The Wavelength Zones are listed under Service health, Zone status.

To find your Wavelength Zones using the AWS CLI

  1. Use the describe-availability-zones command as follows to describe the Wavelength Zones within the specified Region.

    aws ec2 describe-availability-zones --region region-name
  2. Use the describe-availability-zones command as follows to describe the Wavelength Zones regardless of the opt-in status.

    aws ec2 describe-availability-zones --all-availability-zones

To find your Wavelength Zone using the AWS Tools for Windows PowerShell

Use the Get-EC2AvailabilityZone command as follows to describe the Wavelength Zone within the specified Region.

PS C:\> Get-EC2AvailabilityZone -Region region-name

Enable Wavelength Zones

Before you specify a Wavelength Zone for a resource or service, you must enable Wavelength Zones.

Considerations

  • You must request access in order to use Wavelength Zones. For information about how to request Wavelength Zone access, see AWS Wavelength.

  • Some AWS resources are not available in all Regions. Make sure that you can create the resources that you need in the desired Region or Wavelength Zone before launching an instance in a specific Wavelength Zone.

To opt in to Wavelength Zone using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the upper-left corner of the page, select New EC2 Experience. You cannot complete this task using the old console experience.

  3. From the Region selector in the navigation bar, select the Region for the Wavelength Zone.

  4. On the navigation pane, choose EC2 Dashboard.

  5. In the upper-right corner of the page, choose Account attributes, Zones.

  6. Under Wavelength Zones, turn on each Wavelength Zone.

  7. Enable the Wavelength Zone.

To enable Wavelength Zones using the AWS CLI

Use the modify-availability-zone-group command.

Launching instances in a Wavelength Zone

When you launch an instance, you can specify a subnet which is in a Wavelength Zone. You also allocate a carrier IP address from a network border group, which is a unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

For information about how to launch an instance in a Wavelength Zone, see Get started with AWS Wavelength in the AWS Wavelength Developer Guide.

AWS Outposts

AWS Outposts is a fully managed service that extends AWS infrastructure, services, APIs, and tools to customer premises. By providing local access to AWS managed infrastructure, AWS Outposts enables customers to build and run applications on premises using the same programming interfaces as in AWS Regions, while using local compute and storage resources for lower latency and local data processing needs.

An Outpost is a pool of AWS compute and storage capacity deployed at a customer site. AWS operates, monitors, and manages this capacity as part of an AWS Region. You can create subnets on your Outpost and specify them when you create AWS resources such as EC2 instances, EBS volumes, ECS clusters, and RDS instances. Instances in Outpost subnets communicate with other instances in the AWS Region using private IP addresses, all within the same VPC.

To begin using AWS Outposts, you must create an Outpost and order Outpost capacity. For more information about Outposts configurations, see our catalog. After your Outpost equipment is installed, the compute and storage capacity is available for you when you launch Amazon EC2 instances and create Amazon EBS volumes on your Outpost.

Launching instances on an Outpost

You can launch EC2 instances in the Outpost subnet that you created. Security groups control inbound and outbound traffic for instances in an Outpost subnet, as they do for instances in an Availability Zone subnet. To connect to an EC2 instance in an Outpost subnet, you can specify a key pair when you launch the instance, as you do for instances in an Availability Zone subnet.

The root volume must be 30 GB or smaller. You can specify data volumes in the block device mapping of the AMI or the instance to provide additional storage. To trim unused blocks from the boot volume, see How to Build Sparse EBS Volumes in the AWS Partner Network Blog.

We recommend that you increase the NVMe timeout for the root volume. For more information, see I/O operation timeout.

For information about how to create an Outpost, see Get started with AWS Outposts in the AWS Outposts User Guide.

Creating a volume on an Outpost

You can create EBS volumes in the Outpost subnet that you created. When you create the volume, specify the Amazon Resource Name (ARN) of the Outpost.

The following create-volume command creates an empty 50 GB volume on the specified Outpost.

aws ec2 create-volume --availability-zone us-east-2a --outpost-arn arn:aws:outposts:us-east-2:123456789012:outpost/op-03e6fecad652a6138 --size 50

You must detach an Outpost volume before you can modify it. For more information about detaching volumes, see Detaching an Amazon EBS volume from a Linux instance.