🟧

Amazon Web Services Beginner

Get started with AWS: the console and aws CLI, regions and AZs, EC2, S3, VPC basics, IAM and the free tier.

20 lessons 60 quiz questions
Lessons & quizzes Certificate

📚 Lessons & quizzes

Each lesson ends with its own short quiz. Answer them as you go — score 90% across all lessons to earn your certificate.

1 What cloud computing and AWS are

Cloud computing is renting computing resources — servers, storage, databases, networking — over the internet, paying only for what you use instead of buying and running your own hardware.

Amazon Web Services (AWS) is the largest cloud provider. It offers hundreds of services you call through a web console, a command-line tool, or an API. The three classic delivery models are:

  • IaaS (Infrastructure as a Service) — raw virtual machines and storage, e.g. EC2.
  • PaaS (Platform as a Service) — a managed platform you deploy code onto, e.g. Elastic Beanstalk.
  • SaaS (Software as a Service) — finished software you just use, e.g. a hosted email app.

The big wins are elasticity (scale up or down on demand), pay-as-you-go pricing, and no upfront capital cost.

2 Creating an account and the free tier

To use AWS you create an account tied to an email and a payment method. The very first identity created is the root user — it has unrestricted power and should be locked away (we cover that under IAM).

New accounts get the AWS Free Tier, which has three flavours:

  • 12-month free — e.g. 750 hours/month of a t2.micro or t3.micro EC2 instance, and 5 GB of S3, for the first year.
  • Always free — e.g. 1 million AWS Lambda requests per month, forever.
  • Trials — short-term free use of specific services.

The free tier is a great sandbox, but you can still be billed if you exceed limits — so set up a budget early (covered later).

3 The Management Console and CloudShell

The AWS Management Console is the web UI at console.aws.amazon.com. Every service has its own page, and a Region selector sits in the top-right — most resources you see depend on the Region you have selected.

AWS CloudShell is a browser-based terminal built into the console. It launches a Linux shell that is already authenticated as your console identity, with the aws CLI pre-installed — so you can run commands without configuring anything locally.

CloudShell gives you 1 GB of persistent storage in your home directory per Region, and is itself free (you pay only for resources it creates).

# Inside CloudShell the CLI is already authenticated.
# Confirm which identity and account you are using:
aws sts get-caller-identity

4 The aws CLI basics

The AWS CLI is a command-line tool that talks to every service. On your own machine you install it, then run aws configure to store an access key, secret key, default Region and output format in ~/.aws/.

Every command follows the same shape: aws <service> <operation> [--options]. The CLI returns JSON by default, which you can filter with --query or reformat with --output table.

Prefer IAM roles over long-lived access keys when you can; keys stored on disk are a common source of leaks.

# One-time setup on your own computer:
aws configure
# Then list your S3 buckets and show the configured Region:
aws s3 ls
aws configure get region
# Get clean text instead of JSON:
aws ec2 describe-regions --output table

5 Global infrastructure: Regions, AZs and edge locations

AWS hardware is organised into a hierarchy:

  • A Region is a separate geographic area (e.g. eu-north-1 in Stockholm). Regions are isolated from each other for fault tolerance and data residency.
  • An Availability Zone (AZ) is one or more discrete data centres inside a Region, with independent power and networking. Each Region has multiple AZs (e.g. eu-north-1a, eu-north-1b).
  • Edge locations are many smaller sites used by content-delivery and DNS services (CloudFront, Route 53) to serve users with low latency.

Spreading resources across several AZs is the simplest way to survive a single data-centre failure.

# List the Regions available to your account:
aws ec2 describe-regions --query "Regions[].RegionName" --output table
# List the Availability Zones in your current Region:
aws ec2 describe-availability-zones --query "AvailabilityZones[].ZoneName" --output table

6 IAM: users, groups, roles and policies

IAM (Identity and Access Management) controls who can do what in your account. Its building blocks:

  • Users — a person or app with long-term credentials.
  • Groups — a collection of users that share permissions.
  • Roles — a set of permissions that can be assumed temporarily, ideal for EC2 instances or other AWS services.
  • Policies — JSON documents that grant or deny specific actions on specific resources.

IAM is deny by default: an action is allowed only if a policy explicitly allows it and nothing explicitly denies it.

# Create a group, attach a read-only policy, add a user to it:
aws iam create-group --group-name developers
aws iam attach-group-policy --group-name developers \
  --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess
aws iam create-user --user-name alice
aws iam add-user-to-group --user-name alice --group-name developers

7 Root account safety and MFA

The root user can do anything, including closing the account and changing billing — so you should almost never use it. Best practice:

  • Use root only for the handful of tasks that require it, then log out.
  • Create an IAM admin user (or use IAM Identity Center) for daily work.
  • Delete any root access keys — root should not have programmatic keys.
  • Enable Multi-Factor Authentication (MFA) on root and on every privileged user.

MFA adds a second proof of identity (a code from an authenticator app or a hardware key) on top of the password, so a stolen password alone is not enough to log in.

8 EC2: launch and connect with key pairs

Amazon EC2 (Elastic Compute Cloud) provides resizable virtual servers, called instances. To launch one you pick an AMI (a machine image / OS template), an instance type (size), and a key pair.

A key pair is an SSH public/private key. AWS keeps the public key on the instance; you keep the private .pem file. You connect over SSH using that private key — AWS never stores your private key, so if you lose it you cannot recover it.

To reach the instance, its security group must allow inbound SSH (port 22) from your IP, and the instance needs a public IP.

# Create a key pair and save the private key locally:
aws ec2 create-key-pair --key-name my-key \
  --query "KeyMaterial" --output text > my-key.pem
chmod 400 my-key.pem
# Connect once the instance is running (Amazon Linux uses 'ec2-user'):
ssh -i my-key.pem ec2-user@<PUBLIC_IP>

9 Instance types and pricing models

EC2 instance types are grouped by purpose and sized by a letter+number, e.g. t3.micro, m5.large, c6g.xlarge. Families include general-purpose (t, m), compute-optimised (c), memory-optimised (r) and more.

You also choose a pricing model:

  • On-Demand — pay per second/hour, no commitment. Best for short or unpredictable workloads.
  • Spot — bid on spare capacity for up to ~90% off, but AWS can reclaim the instance with a 2-minute warning. Great for fault-tolerant batch jobs.
  • Reserved Instances / Savings Plans — commit to 1 or 3 years for a big discount on steady workloads.
# Browse current On-Demand and Spot prices from the CLI:
aws ec2 describe-instance-types \
  --query "InstanceTypes[].InstanceType" --output table
aws ec2 describe-spot-price-history \
  --instance-types t3.micro --max-items 5

10 Amazon S3: buckets, objects and storage classes

Amazon S3 (Simple Storage Service) stores files as objects inside buckets. Bucket names are globally unique across all of AWS, and each object has a key (its path-like name) plus metadata.

S3 offers storage classes that trade cost against access speed:

  • S3 Standard — frequent access, lowest latency.
  • S3 Standard-IA / One Zone-IA — infrequent access, cheaper storage, retrieval fee.
  • S3 Glacier / Deep Archive — very cheap long-term archive, slower retrieval.

By default buckets are private; you grant access deliberately with policies — never make a bucket public by accident.

# Create a bucket, upload a file, list and download it:
aws s3 mb s3://my-unique-bucket-2026
aws s3 cp report.pdf s3://my-unique-bucket-2026/
aws s3 ls s3://my-unique-bucket-2026/
aws s3 cp s3://my-unique-bucket-2026/report.pdf ./copy.pdf

11 EBS volumes: block storage for EC2

Amazon EBS (Elastic Block Store) provides persistent block storage that attaches to an EC2 instance like a virtual hard drive. Unlike S3 (object storage), EBS is mounted as a filesystem and survives instance stops/starts.

  • A volume lives in a single Availability Zone and can attach to instances in that same AZ.
  • Common types: gp3 (general-purpose SSD), io2 (high-IOPS SSD), st1 (throughput HDD).
  • You back up a volume with a snapshot, which is stored in S3 and can be copied across Regions.

Instance store (ephemeral) disks are faster but lost on stop — EBS is the durable choice.

# Create a 10 GiB gp3 volume, then snapshot it:
aws ec2 create-volume --availability-zone eu-north-1a \
  --size 10 --volume-type gp3
aws ec2 create-snapshot --volume-id vol-0abc123 \
  --description "nightly backup"

12 VPC, subnets, route tables and the Internet Gateway

A VPC (Virtual Private Cloud) is your own isolated network in AWS, defined by a CIDR range like 10.0.0.0/16. Inside it you carve out subnets, each living in one AZ.

  • A public subnet has a route to an Internet Gateway (IGW), so resources can reach (and be reached from) the internet.
  • A private subnet has no direct internet route; instances there reach out via a NAT gateway and stay unreachable from outside.
  • A route table decides where traffic for a destination goes — adding 0.0.0.0/0 → IGW is what makes a subnet public.
# Create a VPC and a subnet inside it:
aws ec2 create-vpc --cidr-block 10.0.0.0/16
aws ec2 create-subnet --vpc-id vpc-0abc123 \
  --cidr-block 10.0.1.0/24 --availability-zone eu-north-1a
# Attach an Internet Gateway:
aws ec2 create-internet-gateway
aws ec2 attach-internet-gateway \
  --internet-gateway-id igw-0def456 --vpc-id vpc-0abc123

13 Security Groups versus Network ACLs

Two firewall layers protect a VPC, and they behave differently:

  • Security Groups act at the instance level. They are stateful — if you allow inbound traffic, the matching return traffic is automatically allowed. They support allow rules only.
  • Network ACLs (NACLs) act at the subnet level. They are stateless — you must allow both inbound and outbound directions explicitly. They support both allow and deny rules and are evaluated in numbered order.

In practice you control most access with security groups and use NACLs as a coarse subnet-wide backstop.

# Create a security group and allow SSH from your IP only:
aws ec2 create-security-group --group-name web-sg \
  --description "web server" --vpc-id vpc-0abc123
aws ec2 authorize-security-group-ingress \
  --group-id sg-0abc123 --protocol tcp --port 22 \
  --cidr 203.0.113.10/32

14 Elastic IP and a basic load balancer

An Elastic IP (EIP) is a static public IPv4 address you allocate to your account and attach to an instance. Unlike a default public IP (which changes when an instance stops), an EIP stays the same — handy for a fixed endpoint.

An Elastic Load Balancer (ELB) spreads incoming traffic across several instances, improving availability and scale. The common type is the Application Load Balancer (ALB), which routes HTTP/HTTPS traffic to a target group of instances and runs health checks, sending traffic only to healthy targets.

Putting an ALB in front of instances across multiple AZs is a standard way to build a resilient web tier.

# Allocate an Elastic IP and associate it with an instance:
aws ec2 allocate-address --domain vpc
aws ec2 associate-address \
  --instance-id i-0abc123 --allocation-id eipalloc-0def456

15 The shared responsibility model

Security in AWS is a partnership defined by the shared responsibility model:

  • AWS is responsible for security of the cloud — the physical data centres, hardware, and the global infrastructure that runs the services.
  • You are responsible for security in the cloud — your data, IAM permissions, OS patching on EC2, security-group rules, and encryption settings.

The split shifts with the service. For a managed service like S3 or Lambda, AWS handles more of the stack; for raw EC2, you manage the guest OS and everything above it. Misconfiguration on your side (e.g. a public bucket) is your responsibility, not a failure of AWS.

16 Pricing, billing, Budgets and Cost Explorer

AWS charges per service and per usage; there is no single flat fee. To stay in control:

  • AWS Pricing Calculator — estimate costs before you build.
  • Cost Explorer — visualise and analyse your historical spend, broken down by service, Region or tag.
  • AWS Budgets — set a spending or usage threshold and get alerted (or take action) when you approach it.

Setting a small monthly budget with an email alert on a new account is the single best habit to avoid surprise bills — do it on day one.

# Inspect this month's costs grouped by service with Cost Explorer:
aws ce get-cost-and-usage \
  --time-period Start=2026-06-01,End=2026-06-30 \
  --granularity MONTHLY --metrics "UnblendedCost" \
  --group-by Type=DIMENSION,Key=SERVICE

17 Tagging resources

A tag is a simple key/value label you attach to almost any AWS resource, e.g. Environment=production or Owner=alice. Tags carry no inherent meaning to AWS but are powerful for organising your account:

  • Cost allocation — group spend by project, team or environment in Cost Explorer.
  • Automation — scripts and policies can target resources by tag.
  • Access control — IAM policies can allow actions only on resources with a given tag.

Agree on a tagging convention early; retro-tagging a sprawling account is painful.

# Tag an EC2 instance, then find everything with that tag:
aws ec2 create-tags --resources i-0abc123 \
  --tags Key=Environment,Value=production Key=Owner,Value=alice
aws ec2 describe-instances \
  --filters "Name=tag:Environment,Values=production"

18 CloudFormation: infrastructure as code

Infrastructure as Code (IaC) means describing your resources in a text file instead of clicking through the console. AWS CloudFormation is the native IaC service.

You write a template (YAML or JSON) listing the resources you want, then deploy it as a stack. CloudFormation figures out the order, creates everything, and tracks it as one unit — so you can update or delete the whole stack reproducibly.

Benefits: version-controlled infrastructure, repeatable environments, and easy teardown (deleting the stack removes everything it created).

# A tiny template (s3.yaml) creating one bucket:
#   Resources:
#     MyBucket:
#       Type: AWS::S3::Bucket
# Deploy it as a stack, then remove it:
aws cloudformation deploy \
  --template-file s3.yaml --stack-name my-first-stack
aws cloudformation delete-stack --stack-name my-first-stack

19 First end-to-end deploy: a web server on EC2

Let us tie it together and put a real website online. The steps:

  1. Launch a free-tier EC2 instance from an Amazon Linux AMI in a public subnet.
  2. Attach a security group allowing inbound HTTP (80) from anywhere and SSH (22) from your IP.
  3. Use a user-data script to install and start a web server automatically on first boot.
  4. Browse to the instance public IP to see the page.

User data is a script the instance runs once at launch — perfect for bootstrapping software without logging in.

# user-data.sh installs Apache and serves a page:
#   #!/bin/bash
#   yum -y install httpd
#   systemctl enable --now httpd
#   echo "Hello from EC2" > /var/www/html/index.html
aws ec2 run-instances --image-id ami-0abc123 \
  --instance-type t3.micro --key-name my-key \
  --security-group-ids sg-0abc123 \
  --user-data file://user-data.sh

20 The AWS certification path

AWS certifications validate your skills and map nicely to a learning journey:

  • AWS Certified Cloud Practitioner — the foundational, mostly non-technical exam covering the concepts in this course: services, pricing, the shared responsibility model and the cloud value proposition. A great first goal.
  • AWS Certified Solutions Architect – Associate — the popular next step, going deeper into designing resilient, cost-effective architectures with EC2, S3, VPC, IAM and more.
  • Beyond that sit other Associate, Professional and Specialty certifications.

A common path is Cloud Practitioner → Solutions Architect Associate, building on exactly the fundamentals you have just learned.

🎓 Certificate of Completion

🔒 Complete every lesson quiz above with 90%+ to unlock your downloadable certificate.