AWS Basics
Get started with core AWS services: EC2, S3, RDS, and IAM for building cloud applications.
What you'll learn
- Core AWS services and what they do
- EC2 for virtual servers, S3 for storage
- IAM for security and access control
- Using the AWS CLI and console
Concept
Core Services
Amazon Web Services offers over 200 services, but a few are fundamental. EC2 (Elastic Compute Cloud) provides virtual servers you can configure and run. S3 (Simple Storage Service) is an object store for files, backups, and static websites. RDS (Relational Database Service) manages databases like PostgreSQL and MySQL. VPC (Virtual Private Cloud) isolates your resources in a private network. Lambda runs code without servers. These services form the building blocks of most AWS architectures.
EC2 Instances
An EC2 instance is a virtual server. You choose an instance type (size — like t3.micro for small workloads or m5.large for bigger ones), an AMI (Amazon Machine Image — the OS and software), and a region. You launch it, connect via SSH, and use it like any server. EC2 instances can be auto-scaled, load-balanced, and terminated when no longer needed. You pay per second while the instance is running.
S3 Storage
S3 stores objects (files) in buckets. Each object has a key (name) and metadata. S3 is infinitely scalable, highly durable (11 nines), and cheap. It is used for file uploads, static website hosting, data backups, and as a data lake. Objects can be public or private, and you can set lifecycle rules to automatically move old data to cheaper storage tiers or delete it.
IAM Security
IAM (Identity and Access Management) controls who can do what in your AWS account. Users, groups, and roles have policies attached that define permissions. The golden rule is least privilege — give only the permissions needed, nothing more. Never use the root account for everyday tasks. Use roles for EC2 instances and services instead of storing access keys on servers. Enable MFA on all accounts.
AWS Free Tier
AWS offers a free tier for new accounts — 750 hours of t2.micro EC2 per month, 5GB of S3 storage, and 1 million Lambda requests. This is perfect for learning and small projects. Be aware that the free tier expires after 12 months for some services, and exceeding limits incurs charges. Set up billing alerts immediately after creating an account. The free tier makes AWS accessible for experimentation, but always clean up resources you no longer need to avoid surprise charges on your bill.
Example
# Create an S3 bucket and upload a file
aws s3 mb s3://my-app-bucket-12345
aws s3 cp ./dist/index.html s3://my-app-bucket-12345/
aws s3 website s3://my-app-bucket-12345 \
--index-document index.html --error-document error.html
# Launch an EC2 instance
aws ec2 run-instances \
--image-id ami-0c02fb559f6fe2234 \
--instance-type t3.micro \
--key-name my-key-pair \
--security-group-ids sg-12345678
# List IAM users and policies
aws iam list-users
aws iam list-attached-user-policies --user-name myuser
These commands create an S3 bucket for static hosting, launch an EC2 instance, and list IAM users. The AWS CLI mirrors the console functionality for scripting.
Try it
- SSH Key Generator
Generate key pairs for EC2 SSH access.
- JSON Schema Validator
Validate IAM policy documents.
- HTTP Request Tester
Test AWS API endpoints and S3-hosted sites.
Common mistakes
The mistake
Using the root account for everyday work
The fix
Create an IAM user with limited permissions for daily tasks. Use roles for services. The root account has unrestricted access and should only be used for initial setup and account-level changes.
The mistake
Leaving S3 buckets public unintentionally
The fix
Enable Block Public Access on all buckets by default. Only make objects public deliberately with explicit policies. Unintentional public buckets are a leading cause of data breaches.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.