AWS Certified Cloud Practitioner
Amazon EC2 and Instance Types
Learn what Amazon EC2 is, the pieces that make up an instance, and how to read instance type names so you can pick the right hardware for a workload.
- Define Amazon EC2 and explain what an instance is
- Identify the main parts of an instance: AMI, instance type, key pair, security group, and storage
- Compare the five EC2 instance type families and the workloads each one suits
- Read an instance type name and explain what each part means
Why this matters
Amazon EC2 is the service most people picture when they think of cloud computing: you rent a server, and it runs your application. It is one of the oldest and most widely used AWS services, and almost every other compute topic builds on it. The exam expects you to know what EC2 is, what makes up an instance, and how to match an instance type to a workload.
EC2 stands for Elastic Compute Cloud. "Elastic" because you can add or remove servers quickly, and "Compute" because the service gives you raw processing power. Instead of buying physical machines, you launch virtual servers in minutes and pay only for what you run.
What is Amazon EC2
Amazon EC2 provides on-demand, scalable computing capacity in the AWS Cloud. You launch virtual servers, called instances, and you control the operating system, the software, the networking, and the storage. You can start with one small instance and grow to thousands, then scale back down when demand drops.
Because the servers are virtual, you skip the slow parts of traditional IT. There is no hardware to buy, no data center to rack it in, and no weeks of waiting. You pick what you want, launch it, and it is ready in minutes. When you no longer need an instance, you stop or terminate it and stop paying for its compute time.
EC2 gives you a lot of control, which makes it flexible but also means more is your responsibility. You manage the operating system, patches, and the software you install. Later lessons cover services like Lambda and Fargate that hand more of that work to AWS.
The parts of an instance
When you launch an instance, you bring together a few pieces. Knowing each one is enough for the exam and for your first real launch.
| Component | What it is |
|---|---|
| Amazon Machine Image (AMI) | A template with the operating system and software the instance starts from |
| Instance type | The hardware profile: how much CPU, memory, storage, and network the instance gets |
| Key pair | A public and private key used to log in securely. AWS keeps the public key, you keep the private key |
| Security group | A virtual firewall that controls which traffic can reach and leave the instance |
| Storage | Disk for the instance: Amazon EBS for persistent volumes, or instance store for temporary data |
The AMI decides what the server is (for example, Amazon Linux, Ubuntu, or Windows Server with your app preinstalled). The instance type decides how powerful it is. The key pair lets you connect to it. The security group decides who can talk to it. The storage holds its data.
One storage detail matters for the exam: Amazon EBS volumes are persistent, so the data survives a stop or restart, while instance store is temporary and is erased when the instance stops, hibernates, or terminates. Use instance store only for scratch data you can afford to lose.
Instance type families
Every instance type belongs to a family that is tuned for a kind of work. Picking the right family means you pay for the resources your workload actually needs, instead of a generic machine that is too weak in one area and wasted in another.
| Family | Tuned for | Good for |
|---|---|---|
| General purpose | A balance of compute, memory, and networking | Web servers, small and medium databases, dev and test environments |
| Compute optimized | High-performance processors | Batch processing, media transcoding, dedicated game servers, modeling |
| Memory optimized | Large amounts of RAM | In-memory databases, big-data analytics, large enterprise applications |
| Storage optimized | High local disk I/O | Data warehouses, large transactional databases, distributed file systems |
| Accelerated computing | Hardware accelerators like GPUs | Machine learning, graphics rendering, scientific simulation |
A simple way to remember it: general purpose is the all-rounder, compute optimized leans on the CPU, memory optimized leans on RAM, storage optimized leans on fast disks, and accelerated computing adds GPUs and other accelerators. AWS also offers an HPC optimized family for large-scale high-performance computing, but the five above are the core set to know.
Reading an instance type name
Instance type names look cryptic at first, but they follow a fixed pattern. Take c7gn.xlarge as an example:
- c is the series, the family letter. Here
cmeans compute optimized. - 7 is the generation. A higher number means newer hardware, usually with better price and performance.
- gn are the options, extra attributes such as a specific processor or added networking.
- xlarge is the size, after the dot. Larger sizes give you more vCPUs and memory.
So c7gn.xlarge reads as a seventh-generation compute optimized instance with extra options, in the xlarge size. A smaller example, t3.micro, is a third-generation general purpose t instance in the micro size, which is a common choice for light workloads and the AWS Free Tier. You do not need to memorize every letter for the exam, but you should be able to point at a name and say which part is the family, the generation, and the size.
Exam tips
- Amazon EC2 provides resizable virtual servers, called instances, that you launch on demand and pay for by compute time.
- With EC2 you manage the operating system and software, so it gives you control but also more responsibility than serverless options.
- An instance brings together an AMI (the OS and software template), an instance type (the hardware), a key pair (secure login), a security group (firewall), and storage.
- EBS volumes are persistent storage; instance store is temporary and is erased when the instance stops or terminates.
- Know the five core instance families: general purpose, compute optimized, memory optimized, storage optimized, and accelerated computing.
- In a name like
c7gn.xlarge: the letter is the family series, the number is the generation, the trailing letters are options, and the part after the dot is the size.
