Servisphere
Amazon EC2 icon (AWS Architecture Icons)

Amazon EC2

Virtual servers

Rent virtual servers (instances) on AWS, choose your own CPU, RAM and operating system, and install whatever you want.

  • Cost$$ Medium
  • Difficulty●●●●●
  • Costs money when idle?Yes
  • Self-managed
  • In examsCLF · SAA · DVA · SOA

Scope: AZ (an instance lives in 1 AZ)

Open EC2 on the map →
Think of it asLike renting an empty apartment: pick the size you want, then arrange and clean the inside yourself.

Where does EC2 fit?

See the full map →

A real example, step by step

  1. An online shop needs to run a PHP web app and a reporting tool that only runs on Windows.
  2. You pick a t3.medium (2 vCPUs, 4 GB RAM), choose an operating system and click Launch; about a minute later the machine is running.
  3. You SSH in, install the web server and configure it like any normal server; the EBS disk keeps your data even across reboots.
  4. The machine runs 24/7, so it is billed every second, even at midnight with no customers. A one-year commitment with Savings Plans cuts the cost considerably.
  5. As traffic grows, you put the instances in an Auto Scaling group behind a load balancer so machines are added automatically at peak times.

▶ Watch the “3-tier web (traditional)” scenario on the map

When to use it

✓ Use it when

You need full control of the operating system, run traditional software, or run continuously.

✗ Avoid it when

You only need to run short code triggered by events → Lambda; you only need to run containers → Fargate.

Common uses

  • Traditional web/app servers, moved as-is from on-prem (lift-and-shift)
  • Apps that need a specific operating system, drivers or GPUs (ML, rendering)
  • Self-installed databases when you need deep customization
  • Build/CI machines, game servers running continuously

EC2, Lambda or Fargate?

EC2LambdaFargate
What you manageEverything: OS, patching, scalingOnly the function codeThe container image and task settings
Run timeNo limitUp to 15 minutes per invocationNo limit
BillingTime the instance is on, even when idleRequests and run timevCPU and memory while tasks run
Best forTraditional software that needs full controlEvent processing, small APIsContainerized web services

What does it cost?

Examplet3.micro ≈ $0.0104/hour ≈ $7.6/month if running 24/7 (excluding EBS volumes and public IPs).
  • Pricing model: Billed per second (Linux) by instance type. Save up to ~72% with Savings Plans/Reserved Instances, up to ~90% with Spot (can be reclaimed).
  • Free tier: Accounts created before July 15, 2025: 750 hours of t2/t3.micro per month for 12 months. New accounts: deducted from Free Tier credits.
⚠️ Cost traps

Forgetting to stop instances; public IPv4 costs ~$0.005/hour per IP; EBS volumes and snapshots are still billed after the instance stops; data transfer out to the Internet.

Reference prices for us-east-1, updated October 14, 2026; they may have changed. Always check the AWS pricing page. Official AWS pricing page ↗

💡 Exam tip

“Reduce cost for steady, always-on workloads” → Savings Plans or Reserved Instances; “work that can restart and tolerate interruption” → Spot. An app on EC2 that calls other AWS services → attach an IAM role, never store access keys on the instance.

Try real exam questions

AWS certification exams are in English, so the questions are shown as they appear on the exam.

1A company has released a new version of its production application. The company's workload uses Amazon EC2, AWS Lambda, AWS Fargate, and Amazon SageMaker. The company wants to cost optimize the workload now that usage is at a steady state. The company wants to cover the most services with the fewest savings plans. Which combination of savings plans will meet these requirements? (Choose two.)

  1. APurchase an EC2 Instance Savings Plan for Amazon EC2 and SageMaker.
  2. BPurchase a Compute Savings Plan for Amazon EC2, Lambda, and SageMaker.
  3. CPurchase a SageMaker Savings Plan.
  4. DPurchase a Compute Savings Plan for Lambda, Fargate, and Amazon EC2.
  5. EPurchase an EC2 Instance Savings Plan for Amazon EC2 and Fargate.
Show answer

Correct answer: C, D

A Compute Savings Plan covers EC2, Lambda and Fargate together. SageMaker isn't covered by Compute Savings Plans, so it needs its own SageMaker Savings Plan. An EC2 Instance Savings Plan applies only to EC2 in one instance family and region.

2What is the time period with which metric data is sent to CloudWatch when detailed monitoring is enabled on an Amazon EC2 instance?

  1. A15 minutes.
  2. B5 minutes.
  3. C1 minute.
  4. D45 seconds.
Show answer

Correct answer: C

With detailed monitoring, EC2 sends metrics to CloudWatch every 1 minute; the default (basic monitoring) is every 5 minutes.

Practice 700+ more questions on Servisphere →

Frequently asked questions

Do I still pay for an EC2 instance after I stop it?

You stop paying for instance hours, but attached EBS volumes, snapshots and any Elastic IPs you keep are still billed. To stop all charges, terminate the instance and delete the volumes, snapshots and IPs you no longer need.

How do On-Demand, Reserved Instances, Savings Plans and Spot differ?

On-Demand is billed per second with no commitment. Reserved Instances and Savings Plans give deep discounts in exchange for a 1- or 3-year commitment. Spot uses spare AWS capacity and is the cheapest, but can be reclaimed with a two-minute warning, so it suits work that can be restarted, such as batch processing.

What do AWS exams ask about EC2?

Choosing a purchase option (On-Demand, Reserved, Savings Plans, Spot) for a scenario, picking an instance family (compute-, memory- or storage-optimized), placement groups, using IAM roles instead of access keys on the instance, and telling EBS apart from instance store (which loses data when the instance stops).

Related services

Open EC2 on the map →