Learn Programming, Tech & Coding · Free Online Tools

IT Question Answer
Back to AWS
AWS EC2 Complete Guide

AWS EC2 Complete Guide

AWS2,608 viewsBy Admin
aws

What is EC2?

Amazon EC2 (Elastic Compute Cloud) provides resizable virtual servers in the cloud. It's AWS's core compute service — rent a server by the second.

Launching an Instance

  1. Choose an AMI (OS image, e.g. Ubuntu).
  2. Pick an instance type (t2.micro is free-tier).
  3. Configure security groups (firewall).
  4. Create/select a key pair for SSH.
  5. Launch!

Connecting via SSH

ssh -i my-key.pem ubuntu@<public-ip>

Instance Types

FamilyOptimized for
t / mGeneral purpose
cCompute (CPU)
rMemory (RAM)
g / pGPU (ML)

Pricing Options

  • On-Demand — pay per hour, no commitment.
  • Reserved — cheaper for 1-3 year commitment.
  • Spot — up to 90% off spare capacity.

FAQs

What is an AMI?

Amazon Machine Image — a template with the OS and software. More in our AWS section.

What's a security group?

A virtual firewall controlling inbound/outbound traffic to your instance.