Day 6 AWS Solutions Architect Exam Prep: Advanced EC2 Design — Placement Groups, Instance Types, AMIs, and Spot Instances

Advanced EC2 Design — Placement Groups, Instance Types, AMIs, and Spot Instances

Today I covered the foundational pillars of advanced EC2 design. I reviewed the answers to the following questions:

1. How do I choose the single best type of machine for my unique job?

Choosing the best type of machine or instance type is like buying a computer from a store. There may be different departments and what you choose will likely be based on factors like the purpose of the purchase and the price. AWS has 5 main “departments” so you don’t overspend or buy what is not suited for you.

  1. General Purpose (T/M family): It is good for most things. Itoffers a balanced mix of computing power, memory, and networking.
  1. Compute Optimized (C family): This is great for heavy math or scientific work that needs a fast brain (CPU). When you hear scientific modeling or CPU-bound workloads, think of compute optimised.
  1. Memory Optimized (R/X family): This server family is the best choice If your job needs to hold massive amounts of data in quick-access memory (like caching).
  1. Storage Optimized (e.g., I4i, D3): This type is optimized for reading and writing large files very quickly (high sequential I/O).You may call it the filing expert.When you hear in-memory databases and caching applications, think of memory optimised. When you hear high sequential I/O (Input/Output), think of storage optimised.
  1. Accelerated Computing (e.g., P5, G6, F1):These instances are often used for machine learning (ML) or advanced  graphics and use specialized hardware like GPUs or FPGAs.

To immediately save 20–40% on costs, look into using Graviton-based instances (e.g., t4g, c7g). Using the newer Graviton chips is like switching from Intel to a newer, more efficient chip.

2. How can I make my servers talk to each other as fast as humanly possible?

Where AWS physically places your servers in its data centers affects speed and reliability. Placement Groups let you control the physical organization of your EC2 instances to optimize for either speed or fault tolerance.We might compare placement groups to a seating charts.There are different types

Cluster placement group is the type in which instances are placed close together in one AZ like everyone sitting shoulder-to-shoulder (same rack in one location) for instant communication. This is the best choice for ML or high-performance computing (HPC) in which every millisecond counts. This is the low latency, high bandwidth solution

Spread Group is the resilient, maximum fault Isolation option. It is the type in which instances are placed on distinct racks. Everyone gets their own separate desk so if one desk breaks, the others are fine. This provides maximum fault isolation for small, critical applications (up to 7 instances per location). In fact, this is the best way to protect small, critical applications from hardware failure. High availability, small sets.

Partition is the scalable isolation option. It is comparable to dividing the room into several isolated groups. This is used for Big Data ((Hadoop, Kafka, Cassandra) where you need hundreds of machines, but you still want some hardware separation between those large groups

3. How do I guarantee that every new server I launch is perfectly identical?

By using an Amazon Machine Image (AMI). An AMI is a pre-configured template that serves as a blueprint, containing the OS, software, permissions, and necessary configurations. Using Custom AMIs built by the team ensures consistency across all deployed servers.

Types of AMIs: AWS Managed, Marketplace, and Custom (built by the user)

Sharing Blueprints: AMIs could be easily shared across different AWS accounts, but this requires shared snapshots.

Going Multi-Region: If you need to use that identical setup in a different region (eg. moving from US-East to EU-West), you must first copy the AMI to the new region.

Best Practices: 1. Tag AMIs with version numbers  2.Use automation tools like Packer or EC2 Image Builder 3. Encrypt AMIs for compliance

4. Where can I get cloud capacity for up to 90% off, and what’s the risk?

By using Spot instances. Spot Instances let you rent AWS’s spare computing power for up to 90% less than usual. The risk? If AWS suddenly needs that spare power back, they will kick your job off the server with only a 2-minute notice before termination.

While they should never be relied on solely for critical applications, they are great for flexible jobs that don’t need to run 24/7, like CI/CD, batch processing or rendering animations, where it is okay if they stop and start again later.

The best way to use them is to mix them with standard-priced servers (On-Demand) so that the whole system does not crash if the Spot capacity runs out

In conclusion, to build truly advanced, resilient, and cost-efficient cloud architectures, we must: 1. select the perfect Instance Type, 2. place them correctly with Placement Groups, 3.standardize with AMIs, and 4.optimize costs with Spot Instances