☁️ PuffCloud Computing 101🎞️ Slides

Course 1 Β· Cloud fundamentals and the AWS ecosystem

Your cloud runs, your group gets its users

🎯 By the end of today

πŸ—“οΈ The plan for today

TimeWhatWhere
0:00 (15 min)Welcome, how the course works, the projectLecture
0:15 (55 min)Cloud basics, service models, elasticity and HA, CAP, shared responsibility, regionsLecture
1:10 (20 min)Console vs CLI vs SDK, account structure, IAMLecture
1:30 (10 min)Break
1:40 (20 min)The architect's job, platform 2.0 vs 3.0, Well-Architected pillars, the project roadmapLecture
2:00Project M0: Floci setup, group users, the auditor's AccessDenied (catch-up at the start of course 2 if you missed it)Project

🧭 Your AWS: Floci, on your laptop

Everything you build in this course runs on Floci, an AWS emulator in Docker, on your laptop or in a GitHub Codespace.
Same AWS CLI, same commands as real AWS, no timer, no budget, nothing to pay, so you can break things without fear.

Set it up with the setup guide (15 minutes), then come back here for project M0.

☁️ What the cloud is, from laptop to prod

Your laptop is fine as long as you're the only one using what you build.
The day other people need it, it stops being enough.

You build the board app on your laptop: a small Python API (the part that answers requests), a PostgreSQL database and an HTML page.
You run
docker compose up, it works, you show your friends on your Wi-Fi.
Now 52 students need it from anywhere, all at the same time, at 9:00 sharp.

"Prod" (production, the real thing people use) asks a lot more: a machine that never sleeps, a public address, a database with backups you've tested, security updates, enough power for the morning rush, and someone who wakes up when it breaks at 3:00.
Your laptop does none of that.

On-premises means servers you own, in a room you control.
You buy machines, wait weeks for delivery, and size everything for the busiest day of the year, so most of the year they sit idle and you've already paid for them.

In the cloud you rent instead, like a car.
Someone else owns the buildings and the hardware, you rent what you need through an API (a way for programs to send orders to another system), by the second or the hour.
A server is ready in a minute or two, and you stop paying when you give it back.

🎬 From your laptop to the cloud (1 min 26)

πŸ—οΈ So what is the project?

The whole course builds one thing: your group's cloud platform, running a real app from GitHub, the way a platform team runs it in a company.

The app itself doesn't matter. Pick any simple app on GitHub with a Dockerfile (the default is traefik/whoami, it tells you which container answered, perfect to watch a load balancer work).
We grade the cloud around it: identity, network, data, security, monitoring, scaling, and the whole thing as code.

You work in groups of 3, in one Git repo that holds your infra. Anyone in the group can rebuild everything from that repo, on their own machine.

πŸ• IaaS, PaaS, SaaS

Each service you pick decides how much work you keep for yourself.
Pizza works well here: homemade, frozen or delivered.

The three models answer one question: how much of the stack do you still manage yourself?

IaaS (Infrastructure as a Service)PaaS (Platform as a Service)SaaS (Software as a Service)
You manageOperating system, runtime, app, dataYour app and dataYour data and settings
Provider managesHardware, network, virtualizationUpdates, runtimeEverything
AWS examplesEC2, EBS, VPCRDS, Elastic Beanstalk, LambdaAmazon WorkMail, Amazon Chime
Everyday examplesA VPS from any hostHeroku, VercelGmail, Slack, Notion

Puff uses all of them before the course ends.

The board app's API runs on EC2 (IaaS, you install the operating system updates), its database runs on RDS (Relational Database Service, PaaS-like: AWS installs PostgreSQL, updates it, takes backups, you only own the tables and the data).
You'll write code in a browser and chat about it on Slack (SaaS).

Moving right on the table means less work and less control.
Start as far right as you can, and only move left to IaaS when the managed option can't give you what you need.

πŸ• IaaS, PaaS or SaaS?Open full screen
πŸ” Want more?
  • Public cloud: a provider's machines (AWS, Google Cloud, Azure) rented by anyone, each customer kept apart on shared hardware.
  • Private cloud: the same "ask by API" model on hardware owned by one organization (OpenStack, VMware). Full control, full cost.
  • Hybrid cloud: both, connected. A bank keeps its core system in its own building and runs its website in a public cloud.
  • Multi-cloud: several public providers at once. Most companies end up with one main provider plus a few others for specific needs.

πŸ“ˆ Elasticity, scalability, high availability

These four words come up in every job interview, and people mix them up.
For example, let’s picture a supermarket on a Saturday.

Question it answersSupermarket exampleBoard app on Puff
ScalabilityCan it handle more load if I add resources?More checkouts serve more peopleA second API server doubles capacity
ElasticityDoes it add and remove resources by itself, following demand?Extra cashiers called in when the line grows, sent home after2 servers at 8:55, 4 at 9:00, back to 2 at 9:30, without you
High availability (HA)Does it stay up when something fails, with at most a short blip?A cashier leaves, customers walk to the next checkoutA server dies, traffic moves to the other within seconds
Fault toleranceDoes it keep working with zero visible interruption?Two cashiers per checkout, nobody notices if one leavesTwo copies always serve, losing one changes nothing

Key point: high availability accepts a short interruption and recovers fast, fault tolerance hides the failure completely and costs more. Most web apps aim for high availability.

πŸ›’ The supermarketOpen full screen
πŸ” Want more?
  • You can scale vertically (a bigger machine, which has a limit and usually needs a restart) or horizontally (more machines, the cloud way).
  • Elasticity needs horizontal scaling plus automation, which is what Auto Scaling gives Puff in course 5.

βš–οΈ β€œCAP” theorem and fault tolerance

If you keep copies of your data on several machines, one day they won't be able to talk to each other.
You'll have to choose what happens then, so choose on purpose.

Take two friends with the same notebook, one in Paris, one in Lyon, calling each other after every change.
One day the phone line dies.

The CAP theorem (Consistency, Availability, Partition tolerance) says that during a network split like this one (a partition), a system with copies has to pick one of two:

Networks break, so you can't skip the P.
When it happens you have one real choice: refuse to answer, or answer with what you have.

Two copies of a bank's database sit in two data centers and the link goes down. You have €100. If both sides keep accepting withdrawals, you could take €100 on each side and the bank loses money. The bank picks consistency: one side stops accepting writes until the link is back. Now take the board app in the same situation. If one side shows a message 20 seconds late, nobody cares, so it can pick availability and keep serving.

πŸ” Want more?
  • You'll meet this trade-off in AWS directly. RDS Multi-AZ keeps a standby copy in a second Availability Zone and writes to both before confirming, so it picks consistency: when the main copy fails, the database is unreachable for the minute or two it takes to switch over.
  • DynamoDB (an AWS key-value database), by default, gives you "eventually consistent" reads that are cheaper and always answer, and lets you ask for strongly consistent reads when you need them.
βš–οΈ Cut the lineOpen full screen

🀝 The shared responsibility model

Most cloud disasters you read about aren't AWS's fault, and this model tells you exactly where your homework starts.

AWS looks after the cloud itself: buildings, hardware, network.
You look after what you put in it: your data, your access rules, your settings.

It's a bit like renting a flat, the landlord fixes the plumbing but the door you left open is on you.
Where the line sits depends on the service.

EC2 (IaaS)RDS (managed)S3 (managed storage)
Buildings, hardware, networkAWSAWSAWS
Operating system updatesYouAWSAWS
Database software updatesYou, if you install oneAWS (in a time slot you pick)n/a
Firewall rules (security groups)YouYoun/a
Who can access the data (IAM, bucket policies)YouYouYou
Encryption on or off, backups keptYouYouYou

Most cloud data leaks you read about are a bucket made public by mistake: AWS's storage worked fine, the settings were on the customer's side of the line.

Key point: the more managed the service, the less you own, but you always own identity, access and your data.

🀝 Who owns what?Open full screen

πŸ—ΊοΈ Regions and Availability Zones

Where your servers live decides how fast pages load, which laws apply, and what survives a power cut.

A Region is a city-sized area with its own set of data centers: us-east-1 (N. Virginia), eu-central-1 (Frankfurt), eu-west-3 (Paris), and more than 30 others.
Regions are kept apart on purpose, so an outage in one doesn't spread.

Each Region holds several Availability Zones (AZs), named like us-east-1a, us-east-1b.
They're separate buildings in different neighborhoods of the same city, each with its own power and network, close enough to copy data in real time.
Spreading across 2 AZs is the standard way to get high availability on AWS, Puff does it from course 3.

🎬 Regions and Availability Zones (1 min 17)

How to pick a region:

Some services are global (IAM, CloudFront, Route 53, and S3 bucket names are unique worldwide), most are regional (EC2, RDS, VPC).
If you can't find something, check the region.

πŸ—ΊοΈ Pick a regionOpen full screen

πŸ–₯️ Console, CLI, SDK

You can't repeat a click next week, and a real cloud is run from commands and code.

Every action on AWS is an API call. The console, the CLI and the SDKs (Software Development Kits, libraries for your own code) are three ways to send the same orders, like ordering food at the counter, by phone, or through an app.

ConsoleCLI (aws ...)SDK (boto3 for Python)
Good forExploring, learning, quick checksScripts, repeatable steps, quick questionsYour own code calling AWS
RepeatableNo, clicks are forgottenYes, paste it againYes, it's code
In this courseLabs, checking your workEvery project milestoneLambda in course 5

The same question asked three ways, "who am I on AWS?":

Use the console to look and the CLI to do.
In course 6 you'll go one step further with infrastructure as code (IaC), where you describe all of Puff in a file and AWS builds it for you.

🏠 How an AWS account is structured

The account is the outer wall of everything you build, and on Floci your whole group's platform lives in one account, 000000000000.

An AWS account is like a house: everything inside shares one bill and one front door.
Inside it:

On Floci, the test keys in env.sh are the account's root: they can do everything, which is exactly what you never want on real AWS. That's why project M0 creates real users and a read-only auditor, and proves the auditor is denied.

πŸ” Want more?
  • One account can use every region, and each regional resource lives in exactly one. Everything running in the account shows up on its bill, per hour or per request.
  • Real companies don't put everything in one account. They use many (production, testing, sandboxes, backups, security logs) grouped under AWS Organizations, so a mistake or an attack in one stays contained. Course 4 goes deeper.

πŸ” IAM: who can do what

Most security problems in the cloud come down to someone or something having more rights than it needed.

IAM (Identity and Access Management) decides who can do what on AWS, like a badge system in an office building.
For every API call it checks one thing: is this identity allowed to do this action on this resource?
The default answer is no, everything is denied until a policy allows it.

🎬 IAM: badges and keys (1 min 18)
What it isExample
UserA long-lived identity for one person or app, with a password and/or access keysjdupont, who logs into the console
GroupA set of users that share permissionsdevelopers, support
RoleAn identity with no password, borrowed for a while, giving temporary credentialsa role your autoscaler Lambda will use, allowed to scale one service and nothing else
PolicyA JSON document listing what's allowed or denied"read objects in bucket X"

Least privilege means giving each identity the smallest set of permissions it needs.
Start from nothing and add what's missing, never start from * (everything) and plan to tighten it later, because you won't.

Let’s read a policy together, this one is what a deploy script for Puff's frontend should need:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReadWriteFrontendFiles",
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:PutObject"],
      "Resource": "arn:aws:s3:::puff-frontend-jdupont/*"
    },
    {
      "Sid": "ListFrontendBucket",
      "Effect": "Allow",
      "Action": "s3:ListBucket",
      "Resource": "arn:aws:s3:::puff-frontend-jdupont"
    },
    {
      "Sid": "NeverDeleteBuckets",
      "Effect": "Deny",
      "Action": "s3:DeleteBucket",
      "Resource": "*"
    }
  ]
}
πŸ” Want more?
  • Statements can also carry a Condition (only from this IP range, only with MFA). You'll see one in course 4.
  • Companies with good habits don't give humans IAM users at all. People log in through SSO (single sign-on, one company login for every tool) and get a role for a few hours. No long-lived access keys sitting in a laptop's ~/.aws/credentials waiting to leak.
πŸ” Read a policyOpen full screen

πŸ§‘β€πŸ’Ό What an architect actually does

The final project grades you as one.

An architect doesn't pick the coolest services. They turn a need into a design that someone can build, run and pay for.

  1. Listen. Who uses it, how many, when, what data, what must never happen. Constraints come first: budget, law, deadline, the team you actually have.
  2. Design. Draw the boxes and the arrows one request follows.
  3. Choose and reject. For each big decision: the option kept, the options rejected, and why. Writing that down is the job, not paperwork.
  4. Hand over. A design the people on call can run at 3 a.m. without calling you.

IT analysts split the world in two, and you'll hear both words in companies:

Platform 2.0 (traditional)Platform 3.0 (emerging tech)
Where it runsYour own data center, servers you buyRented, on demand, paid by the second
ComponentsPhysical servers, SAN/NAS storage, VLANs and firewalls, middleware (application servers, message buses)Virtual servers, object storage, software-defined networks, managed services, containers, functions
How you change itA change request, weeks of lead timeAn API call or a commit, minutes
Who runs itSeparate teams: one builds, another runs productionThe team that builds it runs it (DevOps, SRE)
What it optimizesStability and controlSpeed, scale, paying for what you use

Key point: platform 2.0 isn't dead. Banks, hospitals and factories run it, and most big companies run both at once (hybrid).
An architect speaks both, so every course has a 🏭 In a data center callout showing the 2.0 version of what you build.

πŸ›οΈ The Well-Architected Framework

At the end of the project you'll defend your platform in front of me, and this is the vocabulary for it.

AWS's Well-Architected Framework is a checklist of good habits grouped in six pillars, like the inspection list for a house.

PillarThe question it asksPuff example
Operational excellenceCan you run, change and fix it calmly?Deploy from code, have logs you can read
SecurityIs access limited and data protected?DB in a private subnet, password in Parameter Store
ReliabilityDoes it recover from failures?API spread over 2 AZs behind a load balancer
Performance efficiencyDoes it use the right resources for the load?Static files on S3 and CloudFront, not on the API
Cost optimizationAre you paying only for what you need?t3.micro instead of t3.medium when CPU sits at 5%
SustainabilityAre you wasting energy and hardware?Scale down to 2 servers at night instead of keeping 4

The pillars pull against each other (more reliability usually costs more), so be ready to explain each trade-off.

πŸš€ Where the project is going

Each course ends with a milestone, checked with ./checks/check.sh M<n>:

πŸ§ͺ Project M0: your cloud, your group, your first AccessDenied

If you missed it, the first 40 minutes of course 2's project block are for catching up. Course 2 starts from here.

Step 0: setup. Follow the setup guide: starter in your group repo, docker compose up -d, source env.sh, ./doctor.sh all OK, export GROUP=gXX.

Step 1: one IAM user per member, in an admin group. Change the three names to yours.

# One IAM user per member (change the names)
aws iam create-user --user-name $GROUP-alice
aws iam create-user --user-name $GROUP-bob
aws iam create-user --user-name $GROUP-chloe

# A group that holds the admin rights, so you manage rights once, not per person
aws iam create-group --group-name $GROUP-admins

# Give the group AWS's built-in admin policy
aws iam attach-group-policy \
  --group-name $GROUP-admins \
  --policy-arn arn:aws:iam::aws:policy/AdministratorAccess

# Put the three users in the group
for u in alice bob chloe; do
  aws iam add-user-to-group --group-name $GROUP-admins --user-name $GROUP-$u
done
# One IAM user per member (change the names)
aws iam create-user --user-name "$env:GROUP-alice"
aws iam create-user --user-name "$env:GROUP-bob"
aws iam create-user --user-name "$env:GROUP-chloe"

# A group that holds the admin rights, so you manage rights once, not per person
aws iam create-group --group-name "$env:GROUP-admins"

# Give the group AWS's built-in admin policy
aws iam attach-group-policy `
  --group-name "$env:GROUP-admins" `
  --policy-arn arn:aws:iam::aws:policy/AdministratorAccess

# Put the three users in the group
foreach ($u in 'alice', 'bob', 'chloe') {
  aws iam add-user-to-group --group-name "$env:GROUP-admins" --user-name "$env:GROUP-$u"
}

Step 2: a read-only auditor, the person from another team who may look but never touch.

# The auditor user
aws iam create-user --user-name $GROUP-auditor

# Its policy: read S3 and EC2, nothing else (no Allow means denied)
aws iam put-user-policy \
  --user-name $GROUP-auditor \
  --policy-name read-only \
  --policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Action": ["s3:List*", "s3:Get*", "ec2:Describe*"],
      "Resource": "*"
    }]
  }'

# An access key for the auditor, saved in a temp file, then loaded in AK / SK
aws iam create-access-key --user-name $GROUP-auditor \
  --query 'AccessKey.[AccessKeyId,SecretAccessKey]' --output text > /tmp/auditor.txt
read AK SK < /tmp/auditor.txt
# The auditor user
aws iam create-user --user-name "$env:GROUP-auditor"

# Its policy: read S3 and EC2, nothing else (no Allow means denied), written to a file
@'
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["s3:List*", "s3:Get*", "ec2:Describe*"],
    "Resource": "*"
  }]
}
'@ | Set-Content auditor-policy.json
aws iam put-user-policy `
  --user-name "$env:GROUP-auditor" `
  --policy-name read-only `
  --policy-document file://auditor-policy.json

# An access key for the auditor, loaded in $AK / $SK
$AK, $SK = (aws iam create-access-key --user-name "$env:GROUP-auditor" `
  --query 'AccessKey.[AccessKeyId,SecretAccessKey]' --output text) -split '\s+'

Step 3: prove it. Same CLI, the auditor's keys. The first command works, the second must be refused.

# Reading as the auditor: allowed
AWS_ACCESS_KEY_ID=$AK AWS_SECRET_ACCESS_KEY=$SK \
  aws ec2 describe-vpcs --query 'Vpcs[].VpcId'

# Writing as the auditor: must fail with AccessDenied, the error goes into NOTES.md
AWS_ACCESS_KEY_ID=$AK AWS_SECRET_ACCESS_KEY=$SK \
  aws s3api create-bucket --bucket $GROUP-hacker 2>&1 | tee -a NOTES.md
# Switch this window to the auditor's keys
$env:AWS_ACCESS_KEY_ID = $AK; $env:AWS_SECRET_ACCESS_KEY = $SK

# Reading as the auditor: allowed
aws ec2 describe-vpcs --query 'Vpcs[].VpcId'

# Writing as the auditor: must fail with AccessDenied, the error goes into NOTES.md
$r = aws s3api create-bucket --bucket "$env:GROUP-hacker" 2>&1 | Out-String
$r; $r | Add-Content NOTES.md

Read the error: it names the user and the missing action. That's how you debug permissions in real life.

Step 4: your group bucket, it hosts your status page in M1.

# Back to your admin keys (env.sh): create the group bucket
aws s3api create-bucket --bucket $GROUP-site
# Back to your admin keys (env.ps1): create the group bucket
. .\env.ps1
aws s3api create-bucket --bucket "$env:GROUP-site"

Step 5: check and commit.

# Run the milestone check, keep its output in NOTES.md
./checks/check.sh M0 | tee -a NOTES.md

# Share it with your group
git add -A
git commit -m "M0"
git push
# Run the milestone check, keep its output in NOTES.md
$r = .\checks\check.ps1 M0
$r; $r | Add-Content NOTES.md

# Share it with your group
git add -A
git commit -m "M0"
git push
🧯 If it doesn't work
  • Unable to locate credentials or a profile error: source env.sh in this terminal.
  • The auditor's write succeeded: you're on an old Floci without enforcement, run ./doctor.sh.
  • GROUP is empty: export GROUP=gXX again, every new terminal needs it.
  • EntityAlreadyExists: you ran a step twice, it's fine, go on.
πŸ“Έ On real AWS

In a real account you'd never hand out an access key like this: people sign in through SSO (IAM Identity Center) and get temporary credentials. Long-lived keys are for the rare machine that can't do better.
The policy you wrote is the same JSON on real AWS, and the error message reads the same.

🎲 Today's quiz

🎲 Today's quizOpen full screen

πŸ€” Think about it

πŸ’‘ Hints
  • Count the single points of failure: server, AZ, database. What does a load balancer need in order to have somewhere else to send traffic?
  • Look at the four region criteria: one of them isn't about money or speed.
  • Uploading the file is on your side of the line. Think about Block Public Access and what the bucket policy's Resource covers.
  • Explicit Deny always wins, but it only covers the action it names.
  • Ask what an old or lost answer costs in each case: a late message, or a wrong vote count.

πŸ“š Go deeper

Back to the timeline