Jeff’s Note #
Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Site Reliability Engineer (SRE).
For SOA-C02 candidates, the confusion often lies in how to handle the immutable placement constraints of EC2 instances within Availability Zones. In production, it’s crucial to understand that EC2 instances cannot be “moved” directly between AZs like files on a disk. This drill addresses the correct operational procedure to execute such migrations safely and efficiently.
The Certification Drill (Simulated Question) #
Scenario #
Nimbus Solutions operates a tiered web application deployed in the us-east-1 region. Currently, two EC2 instances run within a single Availability Zone (AZ) to serve the application. The Site Reliability team has decided to migrate one EC2 instance to a different AZ within the same region to improve fault tolerance and availability.
The Requirement: #
Determine the correct method to move an existing EC2 instance from one Availability Zone to another while minimizing downtime and preserving instance configuration.
The Options #
- A) Clone the EC2 instance to another AZ and terminate the original instance.
- B) Create an Amazon Machine Image (AMI) from the existing instance, launch a new instance in the target AZ using this AMI, and terminate the original instance.
- C) Use the AWS CLI to directly move the EC2 instance to another AZ.
- D) Stop the EC2 instance, change its AZ attribute, and restart it in the new AZ.
Google adsense #
leave a comment:
Correct Answer #
B
Quick Insight: The Site Reliability Imperative #
- EC2 instances are bound to the AZ where they were launched. Migrating an EC2 instance requires creating an AMI to preserve the instance configuration and then launching a new instance in the destination AZ.
- Direct movement or modification of AZ on running or stopped instances is not supported.
- This approach also allows validation of the new instance before decommissioning the original.
Content Locked: The Expert Analysis #
You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?
The Expert’s Analysis #
Correct Answer #
Option B
The Winning Logic #
EC2 instances are tightly coupled to the AZ they are launched in because the underlying hardware and networking are AZ-specific. AWS does not provide a native mechanism to “move” a running or stopped instance from one AZ to another.
Creating an AMI captures the exact OS and application state of an instance (including attached EBS volumes, configuration, and metadata). You can safely launch a new EC2 instance from this AMI in any AZ within the same AWS region.
This approach:
- Preserves your instance configuration and software environment.
- Allows testing the new instance before terminating the original.
- Ensures minimum downtime by scheduling cutover appropriately.
The Trap (Distractor Analysis): #
-
Why not A?
“Clone the EC2 instance” is vague and technically not supported as a single operation. There is no direct “clone” button or function apart from creating an AMI. -
Why not C?
No AWS CLI command exists to move an instance between AZs; AZ is a property fixed at launch. -
Why not D?
You cannot change the AZ of a stopped EC2 instance. Stopping an instance does not expose an option to edit AZ, as it requires launching a new instance for AZ changes.
The Technical Blueprint #
# Step 1: Create an AMI from the instance
aws ec2 create-image --instance-id i-0123456789abcdef0 --name "MigrationAMI" --no-reboot
# Step 2: Launch a new EC2 instance in the target AZ using the AMI
aws ec2 run-instances --image-id ami-0abcdef1234567890 --count 1 --instance-type t3.medium --subnet-id subnet-abc123 --availability-zone us-east-1b
# Step 3: After verification, terminate the original instance
aws ec2 terminate-instances --instance-ids i-0123456789abcdef0
The Comparative Analysis #
| Option | Operational Overhead | Automation Level | Impact |
|---|---|---|---|
| A | High (manual cloning undefined) | Low | Risky and potentially inconsistent |
| B | Moderate (AMI creation + launch) | High | Best practice, reliable, safe |
| C | None | N/A | Impossible (non-supported action) |
| D | None | N/A | Invalid – AZ cannot be changed |
Real-World Application (Practitioner Insight) #
Exam Rule #
“For the exam, always choose the AMI-based migration process when moving EC2 instances between AZs.”
Real World #
In production, teams often automate this workflow via AWS Systems Manager or CI/CD pipelines to snapshot, launch, and test servers, minimizing errors during AZ migrations.
(CTA) Stop Guessing, Start Mastering #
Disclaimer
This is a study note based on simulated scenarios for the SOA-C02 exam.