AWS Certified Cloud Practitioner / EC2 - Elastic Compute Cloud

EC2 Summary

🚀 Key Concepts & Takeaways

Here’s what we learned in this module about Amazon EC2:


1️⃣ EC2 Components

  • AMI (Amazon Machine Image) – defines the operating system of your instance.

  • Instance Type/Size – determines CPU & RAM capacity.

  • Storage – defines disk space for your instance.

  • Security Groups – act as a firewall to allow specific IPs & ports.

  • User Data (Bootstrap Script) – runs commands automatically when the instance first starts (e.g., setting up a web server).


2️⃣ Security Groups

  • Attached to EC2 instances.

  • Define inbound/outbound rules for specific ports and IPs.

  • Protect your instance from unauthorized access.


3️⃣ EC2 User Data

  • Script executed at first launch of an instance.

  • Example: configure instance as a web server with a “Hello World” page.


4️⃣ Connecting to EC2

  • SSH – standard terminal access to Linux instances (port 22).

  • EC2 Instance Connect – browser-based SSH without managing keys.

  • IAM Roles – attach roles to EC2 instances to allow secure access to AWS services without storing keys.


5️⃣ Purchasing Options

Option

Description

Best Use Case

On-Demand

Pay per use, no commitment

Short-term, unpredictable workloads

Reserved (Standard/Convertible)

1–3 year term, discounts up to 72%

Long-term steady workloads

Spot

Up to 90% cheaper, can be interrupted

Flexible, fault-tolerant workloads

Dedicated Host 🏢

Full physical server, control instance placement

Licensing/compliance needs

Dedicated Instance 🖥

Instance on dedicated hardware, no placement control

Isolated workloads


6️⃣ Shared Responsibility Model

Responsibility

Example

AWS (Security of the Cloud)

Data centers, physical hardware, compliance

You (Security in the Cloud)

OS patching, software, IAM roles, security groups, data


7️⃣ Hands-On Recap

  • Launched EC2 instances with AMI, size, storage, security group, and user data.

  • Connected via SSH or EC2 Instance Connect.

  • Attached IAM roles for secure AWS access.

  • Explored purchasing options and shared responsibility.


✅ Key Takeaways

  • EC2 is flexible: choose AMI, size, and storage to match your workload.

  • Security groups & IAM roles are critical for access control & secure operations.

  • Know purchasing options for cost optimization and exam scenarios.

  • AWS handles infrastructure, you handle instance-level security.