Which available zone should I choose when launching an EC2 instance?

I have checked https://www.parkmycloud.com/blog/aws-regions-and-availability-zones/ and https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones. It is easy to choose a region close to my customers. However, how about the available zone?

Which available zone should I choose when launching an EC2 instance to obtain the best performance? For example, I want to launch an EC2 instance in us-east-1, and then add Cloudfront with Origin shield at us-east1, which available zone should I choose? There are 6 of them. Both articles above do not describe how to choose the available zone.

I notice that in https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones, it said us-east-1a in one account may have the same availalize zone with us-east-1b in another account. Does that mean it is better to let Amazon allocate AZ for me instead of choosing one manually?


Solution 1:

The AWS page literally does say what to choose. Bold text highlighted by me.

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.

Thus, I feel you're missing some core concepts here. The AZs are all (effectively) the same within a region. You should be writing your app to be able to use any zones within a region if there's a failure within a zone. From the 3rd sentence of the AWS page you linked:

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.

Solution 2:

It generally doesn't matter which availability zone you choose. Performance and price is the same in each AZ in a region. In some regions some specialty instance types aren't available in every AZ, but that's rare.

AZs let you deploy highly available applications. This is something you could consider as your knowledge of AWS improves. Also make sure you set up backups - EBS snapshots are the easiest way, which you can automate in the EC2 console using Lifecycle Manager.