Back to aws
aws#aws#ec2#s3#iam

AWS Core Services: EC2, S3 and IAM Explained

Three services you cannot avoid on AWS — what they are, what they cost, and the mistakes freshers make.

Jane Contributor August 2, 2026 2 views

AWS Core: EC2, S3, IAM

EC2 — the virtual computer

EC2 (Elastic Compute Cloud) rents you a VM by the second. You choose:

  • Instance typet3.micro (small), m5.large (medium), c7g.xlarge (compute-heavy).
  • AMI — the operating system image (Amazon Linux 2023, Ubuntu 22.04, …).
  • Storage — an EBS volume (like a hard drive).
  • Security group — a mini-firewall.
# Using AWS CLI
aws ec2 run-instances --image-id ami-0abcdef --instance-type t3.micro

S3 — object storage

S3 stores files in buckets (folders). Each file is called an object.

  • Unlimited size.
  • 11 nines of durability (0.000000001% chance of losing an object).
  • Pay per GB stored + per request.

Common use cases: backups, static websites, images/videos, machine-learning data.

aws s3 mb s3://my-notes-bucket
aws s3 cp notes.pdf s3://my-notes-bucket/

IAM — who can do what

IAM (Identity and Access Management) is the HR department of your AWS account.

  • User — a human with a login.
  • Group — a bag of users (e.g. "developers").
  • Role — an assumable identity, usually for services or cross-account access.
  • Policy — a JSON document listing what actions are allowed.

Golden rule: never use the root account for daily work. Create an IAM user (or better, an SSO login) and give it only the permissions it needs.

Common freshers' mistakes

  1. Leaving an EC2 instance running overnight → surprise bill.
  2. Making an S3 bucket public without meaning to → data leak.
  3. Storing access keys in code and pushing to GitHub → someone spins up 100 mining VMs on your dime within minutes.

Real-world example

To host a personal portfolio: put HTML/CSS/JS in an S3 bucket, enable "static website hosting", put CloudFront in front for HTTPS. Total cost: pennies per month.

Keep reading

You may also like

Discussion (0)

No comments yet. Be the first to weigh in.

Leave a comment

Comments are reviewed before appearing.