| Did this page help you? Yes No Tell us about it... |
Topics
This section describes how to work with Regions and Availability Zones.
![]() | Note |
|---|---|
Data transfer between Regions is charged at the Internet data transfer rate for both the sending and the receiving Region. For detailed information on Amazon EC2 charges, go to the Amazon EC2 Product Page. |
Amazon EC2 provides the ability to place instances in multiple locations. Amazon EC2 locations are composed of Availability Zones and Regions. Regions are dispersed and located in separate geographic areas (US, EU, etc.). Availability Zones are distinct locations within a Region that are engineered to be isolated from failures in other Availability Zones and provide inexpensive, low latency network connectivity to other Availability Zones in the same Region.
By launching instances in separate Regions, you can design your application to be closer to specific customers or to meet legal or other requirements. By launching instances in separate Availability Zones, you can protect your applications from the failure of a single location.
The following graphic shows a representation of Amazon EC2. Each Region is completely independent. Each Availability Zone is isolated, but connected through low-latency links.

Amazon EC2 provides multiple Regions so 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.
Each Amazon EC2 Region is designed to be completely isolated from the other Amazon EC2 Regions. This achieves the greatest possible failure independence and stability, and it makes the locality of each EC2 resource unambiguous.
To launch or work with instances, you must specify the correct Region URL endpoint. For example, to access the US-East Region (default), you make service calls to the ec2.us-east-1.amazonaws.com service endpoint.
For information about this product's regions and endpoints, go to Regions and Endpoints in the Amazon Web Services General Reference.
Amazon operates state-of-the-art, highly available data center facilities. However, failures can occur that affect the availability of instances that are in the same location. Although this is rare, if you host all your Amazon EC2 instances in a single location that is affected by such a failure, your instances will be unavailable.
For example, if you have instances distributed across three Availability Zones and one of the instances fails, you can design your application so the instances in the remaining Availability Zones handle any requests.
![]() | Note |
|---|---|
You can use Availability Zones in conjunction with elastic IP addresses to remap IP addresses across Availability Zones. For information on elastic IP addresses, see Elastic IP Addresses Concepts. |
The following table summarizes the available Region and Availability Zone commands and corresponding API actions. For more information about the commands, go to the Amazon Elastic Compute Cloud Command Line Reference. For more information about the API actions, go to the Amazon Elastic Compute Cloud API Reference.
| Command and API Action | Description |
|---|---|
|
|
Lists Availability Zones available to your account |
|
|
Lists Regions available to your account |
This section describes how to determine which Regions and Availability Zones are available.
To find Regions and Availability Zones
Log in to the AWS Management Console and click the Amazon EC2 tab.
To determine available Regions, select the Region list box in the Navigation pane.
After selecting a Region, you can view Availability Zones within that Region when launching an instance or creating a new Amazon EBS volume.
To view Availability Zones within a Region, click Volumes in the Navigation pane.
The Create Volume dialog box appears.
To view Availability Zones within the Region, select the Availability Zones list box.
When you are finished, click Cancel.
To find Regions
Enter the following command to describe Regions:
PROMPT>ec2-describe-regionsREGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com ..
To find Availability Zones
Enter the following command to describe Availability Zones within the us-east-1 Region:
PROMPT>ec2-describe-availability-zones --region us-east-1
Amazon EC2 returns output similar to the following:
AVAILABILITYZONE us-east-1a available us-east-1
AVAILABILITYZONE us-east-1b available us-east-1
AVAILABILITYZONE us-east-1c available us-east-1
AVAILABILITYZONE us-east-1d available us-east-1To find Regions
Construct the following Query request.
https://ec2.amazonaws.com/ ?Action=DescribeRegions &...auth parameters...
Following is an example response.
<DescribeRegionsResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<regionInfo>
<item>
<regionName>us-east-1</regionName>
<regionEndpoint>ec2.us-east-1.amazonaws.com</regionEndpoint>
</item>
<item>
<regionName>eu-west-1</regionName>
<regionEndpoint>ec2.eu-west-1.amazonaws.com</regionEndpoint>
</item>
</regionInfo>
</DescribeRegionsResponse>To find Availability Zones
Construct the following Query request.
https://ec2.amazonaws.com/ ?Action=DescribeAvailabilityZones &...auth parameters...
Following is an example response.
<DescribeAvailabilityZonesResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
<requestId>35a9e5f3-4ed2-4cc2-a616-482b71c82c76</requestId>
<availabilityZoneInfo>
<item>
<zoneName>us-east-1a</zoneName>
<zoneState>available</zoneState>
<regionName>us-east-1</regionName>
<messageSet/>
</item>
<item>
<zoneName>us-east-1b</zoneName>
<zoneState>available</zoneState>
<regionName>us-east-1</regionName>
<messageSet/>
</item>
<item>
<zoneName>us-east-1c</zoneName>
<zoneState>available</zoneState>
<regionName>us-east-1</regionName>
<messageSet/>
</item>
<item>
<zoneName>us-east-1d</zoneName>
<zoneState>available</zoneState>
<regionName>us-east-1</regionName>
<messageSet/>
</item>
</availabilityZoneInfo>
</DescribeAvailabilityZonesResponse>Every command or call you make to EC2 must target a specific Region. This section explains how to specify the Region you want to use.
![]() | Note |
|---|---|
The |
To specify the Region
Change the EC2_URL environment variable's value to the Region's endpoint (e.g.,
https://ec2.us-west-1.amazonaws.com).
![]() | Tip |
|---|---|
You can also use the |
When you launch an instance, you can optionally specify an Availability Zone. If you do not specify an Availability Zone, Amazon EC2 selects one for you in the Region that you are using. When launching your initial instances, we recommend accepting the default Availability Zone, which allows Amazon EC2 to select the best Availability Zone for you based on system health and available capacity. Even if you have other instances running, you might consider not specifying an Availability Zone if your new instances do not need to be close to, or separated from, your existing instances.
![]() | Note |
|---|---|
Availability Zones are not the same across accounts. The Availability Zone us-east-1a for account A is not necessarily the same as us-east-1a for account B. Zone assignments are mapped independently for each account. You are charged a small bandwidth charge for data that crosses Availability Zones. For more information, go to the Amazon EC2 product page. |
To launch an instance in a specific Availability Zone
Specify the Availability Zone you want to launch the instances into using the --availability-zone
option.
PROMPT>ec2-run-instancesami_id-ncount--availability-zonezone
Amazon EC2 returns output similar to the following:
RESERVATION r-0ea54067 999988887777 default INSTANCE i-cfd732a6 ami-6ba54002 pending 0 m1.small 2010-03-19T13:59:03+0000 us-east-1a aki-94c527fd ari-96c527ff monitoring-disabled ebs INSTANCE i-cfd732a7 ami-6ba54002 pending 1 m1.small 2010-03-19T13:59:03+0000 us-east-1a aki-94c527fd ari-96c527ff monitoring-disabled ebs INSTANCE i-cfd732a8 ami-6ba54002 pending 2 m1.small 2010-03-19T13:59:03+0000 us-east-1a aki-94c527fd ari-96c527ff monitoring-disabled ebs INSTANCE i-cfd732a9 ami-6ba54002 pending 3 m1.small 2010-03-19T13:59:03+0000 us-east-1a aki-94c527fd ari-96c527ff monitoring-disabled ebs