
Course 1 Β· Cloud fundamentals and the AWS ecosystem
Your cloud runs, your group gets its users
π― By the end of today
- You can explain what the cloud changes compared to owning servers, and place any service on the IaaS / PaaS / SaaS scale.
- You can tell elasticity, scalability, high availability and fault tolerance apart, and use the CAP theorem to reason about a real failure.
- You can say who's responsible for what in AWS's shared responsibility model, and pick a region for a real constraint.
- You can read an IAM policy line by line and spot when it grants too much.
- You can drive AWS from the CLI on your own Floci, and your group has users, an auditor that's really denied, and its first bucket (project M0).
ποΈ The plan for today
| Time | What | Where |
|---|---|---|
| 0:00 (15 min) | Welcome, how the course works, the project | Lecture |
| 0:15 (55 min) | Cloud basics, service models, elasticity and HA, CAP, shared responsibility, regions | Lecture |
| 1:10 (20 min) | Console vs CLI vs SDK, account structure, IAM | Lecture |
| 1:30 (10 min) | Break | |
| 1:40 (20 min) | The architect's job, platform 2.0 vs 3.0, Well-Architected pillars, the project roadmap | Lecture |
| 2:00 | Project 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.
ποΈ 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 manage | Operating system, runtime, app, data | Your app and data | Your data and settings |
| Provider manages | Hardware, network, virtualization | Updates, runtime | Everything |
| AWS examples | EC2, EBS, VPC | RDS, Elastic Beanstalk, Lambda | Amazon WorkMail, Amazon Chime |
| Everyday examples | A VPS from any host | Heroku, Vercel | Gmail, 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.
π 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 answers | Supermarket example | Board app on Puff | |
|---|---|---|---|
| Scalability | Can it handle more load if I add resources? | More checkouts serve more people | A second API server doubles capacity |
| Elasticity | Does it add and remove resources by itself, following demand? | Extra cashiers called in when the line grows, sent home after | 2 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 checkout | A server dies, traffic moves to the other within seconds |
| Fault tolerance | Does it keep working with zero visible interruption? | Two cashiers per checkout, nobody notices if one leaves | Two 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.
π 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:
- Consistency: every read gets the latest write, or an error.
- Availability: every request gets an answer, maybe with old data.
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.
π€ 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, network | AWS | AWS | AWS |
| Operating system updates | You | AWS | AWS |
| Database software updates | You, if you install one | AWS (in a time slot you pick) | n/a |
| Firewall rules (security groups) | You | You | n/a |
| Who can access the data (IAM, bucket policies) | You | You | You |
| Encryption on or off, backups kept | You | You | You |
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.
πΊοΈ 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.
How to pick a region:
- Latency (the travel time of a request): closer to your users means faster pages. Paris to Frankfurt is around 10 ms, Paris to Virginia around 80 ms.
- Law: some data has to stay in a given country or zone (GDPR, the EU's data protection law, health data, banking rules).
- Price: the same server costs different amounts in different regions,
us-east-1is usually among the cheapest. - Services: new services and features often land in
us-east-1first and reach other regions months later.
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.
π₯οΈ 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.
| Console | CLI (aws ...) | SDK (boto3 for Python) | |
|---|---|---|---|
| Good for | Exploring, learning, quick checks | Scripts, repeatable steps, quick questions | Your own code calling AWS |
| Repeatable | No, clicks are forgotten | Yes, paste it again | Yes, it's code |
| In this course | Labs, checking your work | Every project milestone | Lambda in course 5 |
The same question asked three ways, "who am I on AWS?":
- Console: the account menu in the top right.
- CLI, in your terminal after
source env.sh:aws sts get-caller-identity - SDK:
python3 -c "import boto3; print(boto3.client('sts').get_caller_identity()['Arn'])"
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:
- The root user is the email and password that created the account.
- It can do anything, including closing the account.
- You protect it with MFA (multi-factor authentication, a code from your phone on top of the password), lock it away and almost never use it.
- IAM identities (users and roles, next section) are what people and programs use day to day, each with only the permissions they need.
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.
| What it is | Example | |
|---|---|---|
| User | A long-lived identity for one person or app, with a password and/or access keys | jdupont, who logs into the console |
| Group | A set of users that share permissions | developers, support |
| Role | An identity with no password, borrowed for a while, giving temporary credentials | a role your autoscaler Lambda will use, allowed to scale one service and nothing else |
| Policy | A 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": "*"
}
]
}Versionis the policy language version, always2012-10-17. Leave it as is.- Each
Statementhas anEffect(Allow or Deny), anAction(service:operation), and aResource(an ARN, the unique name of a thing on AWS). - The first statement targets the files (
/*at the end), the second targets the bucket itself (no/*). Listing is a bucket action, reading a file is a file action, so you need both ARNs. - The third statement is an explicit Deny, which always wins over any Allow from any policy. Even with an admin policy attached later, this identity can't delete a bucket.
π 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/credentialswaiting to leak.
π§βπΌ 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.
- Listen. Who uses it, how many, when, what data, what must never happen. Constraints come first: budget, law, deadline, the team you actually have.
- Design. Draw the boxes and the arrows one request follows.
- Choose and reject. For each big decision: the option kept, the options rejected, and why. Writing that down is the job, not paperwork.
- 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 runs | Your own data center, servers you buy | Rented, on demand, paid by the second |
| Components | Physical 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 it | A change request, weeks of lead time | An API call or a commit, minutes |
| Who runs it | Separate teams: one builds, another runs production | The team that builds it runs it (DevOps, SRE) |
| What it optimizes | Stability and control | Speed, 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.
| Pillar | The question it asks | Puff example |
|---|---|---|
| Operational excellence | Can you run, change and fix it calmly? | Deploy from code, have logs you can read |
| Security | Is access limited and data protected? | DB in a private subnet, password in Parameter Store |
| Reliability | Does it recover from failures? | API spread over 2 AZs behind a load balancer |
| Performance efficiency | Does it use the right resources for the load? | Static files on S3 and CloudFront, not on the API |
| Cost optimization | Are you paying only for what you need? | t3.micro instead of t3.medium when CPU sits at 5% |
| Sustainability | Are 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>:
- M0, course 1 π: your cloud runs, your group has users, and you've proven a read-only user is really denied.
- M1, course 2 π₯οΈ: your app from GitHub runs on ECS behind a load balancer, with a database and a status page. Everything wide open, on purpose.
- M2, course 3 π§±: a private network. Only the load balancer answers, your app and database are unreachable from anywhere else.
- M3, course 4 πͺͺ: least privilege, secrets out of your config, logs, and an alarm that pages you.
- M4, course 5 π: two Availability Zones, a kill drill, your own autoscaler, a CDN, and your EPITA idea.
- M5, course 6 π§±: everything as code, rebuilt from zero in front of me, then your defense.
π§ͺ 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.mdRead 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 credentialsor a profile error:source env.shin this terminal.- The auditor's write succeeded: you're on an old Floci without enforcement, run
./doctor.sh. GROUPis empty:export GROUP=gXXagain, 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
π€ Think about it
- Imagine the board app runs on one EC2 server in
us-east-1a. Is it highly available? What's the smallest change that keeps it up if that AZ goes down, and what does it cost you? - A startup stores French patients' appointment data. Its CTO wants
us-east-1because it's cheaper and gets features first. What do you tell them? - Your
puff-frontendbucket ends up serving a.envfile with a database password that you uploaded by mistake. Using the shared responsibility model, whose fault is it, and which two settings would have prevented it? - An identity has a policy allowing
s3:*on*, and another policy with theNeverDeleteBucketsstatement from today. Can it delete objects? Can it delete a bucket? Why? - When the network splits, should the board app's message list favor consistency or availability? Would your answer change if the same app were used to vote on exam grades?
π‘ 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
Resourcecovers. - 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.