Bird
0
0

You want to launch 3 EC2 instances with the same settings but different subnet IDs for high availability. Which approach is best?

hard📝 Best Practice Q15 of 15
AWS - EC2 Fundamentals
You want to launch 3 EC2 instances with the same settings but different subnet IDs for high availability. Which approach is best?
AUse <code>aws ec2 create-subnet</code> to create three subnets and launch one instance
BRun one <code>aws ec2 run-instances</code> command with <code>--count 3</code> and a single <code>--subnet-id</code>
CLaunch one instance and then clone it twice manually
DRun three separate <code>aws ec2 run-instances</code> commands, each with a different <code>--subnet-id</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand subnet and instance launch

    Each EC2 instance can be launched in only one subnet at a time.
  2. Step 2: Plan for multiple subnets

    To launch instances in different subnets, run separate commands specifying each subnet ID.
  3. Step 3: Evaluate options

    Run three separate aws ec2 run-instances commands, each with a different --subnet-id. This runs three commands with different subnet IDs, ensuring instances spread across subnets.
  4. Final Answer:

    Run three separate aws ec2 run-instances commands, each with a different --subnet-id -> Option D
  5. Quick Check:

    One subnet per instance, multiple commands for multiple subnets [OK]
Quick Trick: One subnet per instance, use multiple commands for multiple subnets [OK]
Common Mistakes:
MISTAKES
  • Trying to launch multiple subnets in one command
  • Assuming cloning instances copies subnet settings
  • Confusing subnet creation with instance launch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes