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.
Series
AWS for Beginners
AWS Core: EC2, S3, IAM
EC2 — the virtual computer
EC2 (Elastic Compute Cloud) rents you a VM by the second. You choose:
- Instance type —
t3.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
- Leaving an EC2 instance running overnight → surprise bill.
- Making an S3 bucket public without meaning to → data leak.
- 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
aws
AWS S3 Bucket Best Practices for Production
Ten field-tested rules for locking down, versioning and scaling S3 buckets in production workloads.
aws
Deploy a Container on AWS: Dockerfile → ECR → ECS Fargate
The complete story of getting a Docker container to run on AWS with zero servers to patch — starts here.
aws
Understanding IAM Roles vs Users vs Groups
A crisp mental model for AWS identity primitives — with common pitfalls.
Discussion (0)
No comments yet. Be the first to weigh in.