Availability Zones
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.
Amazon EC2 provides the ability to place instances in multiple locations. Amazon EC2 locations are composed of availability zones and regions. Regions are geographically dispersed and located in separate geographic areas or countries. Currently, Amazon EC2 exposes only a single region with multiple availability zones. Availability zones are distinct locations that are engineered to be insulated from failures in other availability zones and provide inexpensive, low latency network connectivity to other availability zones in the same region. Regions consist of one or more availability zones. By launching instances in separate availability zones, you can protect your applications from the failure of a single location.
For example, if you have instances distributed across three availability zones and one of them 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. |
Availability Zone Selection
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. When launching your initial instances, we recommend accepting the default availability zone, which will allow Amazon EC2 to select the best the 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.
To view the availability zones available to you
-
Enter the following command:
PROMPT>
ec2-describe-availability-zones
AVAILABILITYZONE us-east-1a available AVAILABILITYZONE us-east-1b available AVAILABILITYZONE us-east-1c available
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. |
After determining the availability zones that are available to you, you can launch instances in any of the zones.
Note | |
---|---|
You will be charged a small bandwidth charge for data that crosses availability zones. For more information, go to the Amazon EC2 portal page. |