☁️ PuffCloud Computing 101🎞️ Slides

Course 6 Β· IaC, CI/CD and FinOps

A recipe that rebuilds it all in one command

🎯 By the end of today

πŸ—“οΈ The plan for today

TimeWhatWhere
0:00 (20 min)Why infrastructure as code, CloudFormation anatomy, change sets, drift, Terraform comparisonLecture
0:20 (15 min)CI/CD and deployment strategiesLecture
0:35 (10 min)FinOps, DR, Well-Architected recapLecture
0:45 (15 min)Project M5, steps 1 and 2: read your templates, put your idea inProject
1:00 (30 min)Steps 3 to 5: wipe, rebuild in one command, prove itProject
1:30 (20 min)Steps 6 and 7: a change set, a driftProject
1:50 (10 min)Break
2:00Step 8: freeze, check M5 pushed. Then rolling defenses, 8 minutes per group (see the Project page)Defense

🧱 Why infrastructure as code

Six months from now, someone has opened port 22 on app-sg "for five minutes" during an incident, someone else has changed the database size from the console, and the only record of the VPC (Virtual Private Cloud, your private network) is your memory of course 3.
Nobody knows what your platform really looks like anymore.

Infrastructure as code fixes that.
You describe your cloud in text files, you keep them in Git, and a tool makes AWS match the files.

🎬 The recipe, not the cake (1 min 30)

The template is like a recipe, and the running infrastructure is the cake.
If you lose the cake you bake another one, if you lose the recipe you're guessing.

Four things get better once you do this:

Write the steps, or write the end result

There are two ways to automate infrastructure, and the difference matters more than the tool you pick.

Declarative tools are idempotent, so applying the same file again is safe, that's what lets you automate changes and review them.

πŸ“œ CloudFormation: templates, stacks, change sets

CloudFormation is AWS's own IaC service.
You give it a template written in YAML (or JSON, another text format), and it builds a stack, all the real resources that template describes, managed as one unit.

Delete the stack and everything in it goes away, in the right order, and nothing gets left behind.

A template has three sections you'll use all the time:

Here's a tiny example with comments, one bucket for Puff:

AWSTemplateFormatVersion: "2010-09-09"
Description: Tiny example, one S3 bucket

Parameters:
  Login:                          # passed at deploy time
    Type: String
    Description: Your EPITA login, used in the bucket name

Resources:
  AssetsBucket:                   # logical ID, used inside the template
    Type: AWS::S3::Bucket         # what to create
    Properties:
      BucketName: !Sub "puff-assets-${Login}"   # !Sub fills in ${Login}
      Tags:
        - Key: Project
          Value: puff

Outputs:
  BucketArn:
    Value: !GetAtt AssetsBucket.Arn   # !GetAtt reads an attribute of a resource

Two functions do most of the work.
!Ref X gives you the ID of resource X (or the value of parameter X), !GetAtt X.Attr gives you one specific attribute of it.

Every !Ref also tells CloudFormation "this depends on that", so it builds the VPC before the subnet that points at it.
When a dependency is real but invisible (a route to the internet only works once the gateway is attached), you add DependsOn by hand.

Three stack features matter in real life:

πŸ“œ Read the change setOpen full screen

βš–οΈ CloudFormation vs Terraform

Terraform (by HashiCorp) is the other big declarative tool.
You write HCL (HashiCorp Configuration Language, its own small language), run terraform plan to preview, then terraform apply to build.
The plan is the same idea as a change set.

The big difference is who runs it, AWS runs CloudFormation for you and it only speaks AWS, you run Terraform yourself and it speaks to almost every cloud and online tool.

resource "aws_vpc" "puff" {
  cidr_block = "10.0.0.0/16"
  tags       = { Name = "puff-vpc" }
}

# terraform plan  ->  + aws_vpc.puff will be created
# terraform apply ->  creates it and records the ID in the state

CloudFormation wins on zero setup and tight AWS integration, Terraform wins when your infrastructure goes beyond AWS.

πŸ” Want more? Side by side, and Terraform state
CloudFormationTerraform
Who runs itAWS runs it for youYou run it, on your laptop or in a pipeline
CloudsAWS onlyAWS, GCP, Azure, Datadog, GitHub, Cloudflare and thousands more through plugins called providers
LanguageYAML or JSON with a few built-in functionsHCL, with loops, modules and expressions
Where it remembers what it builtInside AWS, nothing to manageA state file you store and lock yourself
PreviewChange setterraform plan
Fails halfwayRolls back by itselfStops where it failed, you fix and re-apply
DriftDrift detection when you askEvery plan shows it
ReuseNested stacks, modules, AWS Quick StartsA huge public library of modules
LicenceFree, part of AWSBSL (a source-available licence) since 2023, OpenTofu is the open-source fork

Terraform keeps a state file, a JSON record that maps every resource in your code to its real ID in the cloud (aws_vpc.puff is vpc-0abc...).
On each plan it refreshes that record against reality and compares it with your code.

Teams keep state remotely (an S3 bucket with locking, for example) so two people can't apply at the same time, and they guard it carefully, because state can contain passwords in plain text.
CloudFormation's version of this mapping is the Resources tab of a stack, which AWS stores for you.

πŸ§ͺ Project M5: your platform as code, rebuilt from zero

Everything you built since course 2 was typed by hand. Today it becomes two CloudFormation templates and one script, and you prove it the hard way: you wipe everything and rebuild it in one command, in front of me at the defense.

Before you start: M4 green, source env.sh, export GROUP=gXX. Get the templates and the new checks:

# The new checks
curl -fsSL https://raw.githubusercontent.com/ricoleabricot/puff/main/starter/checks/check.sh -o checks/check.sh

# The templates, the rebuild script and the autoscaler code
for f in network.yaml app.yaml rebuild.sh scaler.py; do
  curl -fsSL https://raw.githubusercontent.com/ricoleabricot/puff/main/starter/infra/$f -o infra/$f
done
chmod +x checks/check.sh infra/rebuild.sh
# The new checks
curl.exe -fsSL https://raw.githubusercontent.com/ricoleabricot/puff/main/starter/checks/check.ps1 -o checks/check.ps1

# The templates, the rebuild script and the autoscaler code
foreach ($f in 'network.yaml', 'app.yaml', 'rebuild.ps1', 'scaler.py') {
  curl.exe -fsSL "https://raw.githubusercontent.com/ricoleabricot/puff/main/starter/infra/$f" -o "infra/$f"
}

Step 1: read your templates. Open infra/network.yaml and infra/app.yaml. Every resource is something you created by hand in M2 to M4: find each one, and write in NOTES.md the two you'd have forgotten if you had written the templates yourself.

network.yaml is your course 3 VPC: subnets, route tables, gateways, the security group chain. app.yaml is the rest: the secret, the database, logs, the execution role, the load balancer, ECS, the deployer role.
Your pager, autoscaler and CDN stay in infra/rebuild.sh as CLI commands, the same ones you typed. Moving them into a template is a good extra.

Step 2: your idea goes in. Whatever your idea needs (a schedule, a cache in front of the load balancer, a private bucket) goes into a template or into rebuild.sh / rebuild.ps1, never only in your terminal history. Add a line to your ## Idea section in NOTES.md that starts with - Built: and says what you built and where it lives.

Step 3: wipe everything. Your whole local AWS goes away. Your code stays in Git.

# Commit first: the repo is what survives
git add -A && git commit -m "M5 templates" && git push

# Delete every resource, every stack, every container
./wipe.sh
# Commit first: the repo is what survives
git add -A
git commit -m "M5 templates"
git push

# Delete every resource, every stack, every container
.\wipe.ps1

Step 4: rebuild in one command, and time it.

# Wait for Floci, then rebuild your whole platform
until curl -s localhost:4566 >/dev/null; do sleep 2; done
./infra/rebuild.sh | tee -a NOTES.md
# Wait for Floci, then rebuild your whole platform
do { Start-Sleep 2; curl.exe -s -o NUL http://localhost:4566 } until ($LASTEXITCODE -eq 0)
$r = .\infra\rebuild.ps1
$r; $r | Add-Content NOTES.md

The last line says Rebuilt in N s: it's in NOTES.md now. Open the app URL it prints.

Step 5: prove the rebuilt platform behaves like the old one. Your autoscaler's history was wiped with everything else, so replay the load drill.

# The crowd arrives, then leaves
aws cloudwatch put-metric-data --namespace $GROUP --metric-name Load --value 95
sleep 70
aws cloudwatch put-metric-data --namespace $GROUP --metric-name Load --value 10
sleep 70

# Every milestone, on the rebuilt platform
for m in M2 M3 M4 M5; do ./checks/check.sh $m; done | tee -a NOTES.md
# The crowd arrives, then leaves
aws cloudwatch put-metric-data --namespace $env:GROUP --metric-name Load --value 95
Start-Sleep 70
aws cloudwatch put-metric-data --namespace $env:GROUP --metric-name Load --value 10
Start-Sleep 70

# Every milestone, on the rebuilt platform
$r = foreach ($m in 'M2', 'M3', 'M4', 'M5') { .\checks\check.ps1 $m }
$r; $r | Add-Content NOTES.md

Step 6: a change, the CloudFormation way. A change set shows you what will happen before it happens.

# Ask for 3 containers instead of 2, keep every other parameter
KEEP=$(aws cloudformation describe-stacks --stack-name $GROUP-app --query 'Stacks[0].Parameters[].ParameterKey' \
  --output text | tr '\t' '\n' | grep -v DesiredCount | sed 's/.*/ParameterKey=&,UsePreviousValue=true/')
aws cloudformation create-change-set --stack-name $GROUP-app --change-set-name three-copies \
  --use-previous-template --capabilities CAPABILITY_NAMED_IAM \
  --parameters $KEEP ParameterKey=DesiredCount,ParameterValue=3

# Read it before you run it: what changes, and is anything replaced?
aws cloudformation describe-change-set --stack-name $GROUP-app --change-set-name three-copies \
  --query 'Changes[].ResourceChange.[Action,LogicalResourceId,Replacement]'

# Happy with it? Run it
aws cloudformation execute-change-set --stack-name $GROUP-app --change-set-name three-copies
# Ask for 3 containers instead of 2, keep every other parameter
$KEEP = (aws cloudformation describe-stacks --stack-name "$env:GROUP-app" `
  --query 'Stacks[0].Parameters[].ParameterKey' --output text) -split '\s+' |
  Where-Object { $_ -and $_ -ne 'DesiredCount' } |
  ForEach-Object { "ParameterKey=$_,UsePreviousValue=true" }
aws cloudformation create-change-set --stack-name "$env:GROUP-app" --change-set-name three-copies `
  --use-previous-template --capabilities CAPABILITY_NAMED_IAM `
  --parameters $KEEP ParameterKey=DesiredCount,ParameterValue=3

# Read it before you run it: what changes, and is anything replaced?
aws cloudformation describe-change-set --stack-name "$env:GROUP-app" --change-set-name three-copies `
  --query 'Changes[].ResourceChange.[Action,LogicalResourceId,Replacement]'

# Happy with it? Run it
aws cloudformation execute-change-set --stack-name "$env:GROUP-app" --change-set-name three-copies

Step 7: drift, the change nobody wrote down. Someone opens port 22 "for five minutes" during an incident.

# The hand change
APP_SG=$(aws cloudformation describe-stacks --stack-name $GROUP-network \
  --query "Stacks[0].Outputs[?OutputKey=='ApiSecurityGroupId'].OutputValue" --output text)
aws ec2 authorize-security-group-ingress --group-id $APP_SG --protocol tcp --port 22 --cidr 0.0.0.0/0

# Redeploy the template: CloudFormation says nothing changed, and the rule stays
aws cloudformation deploy --stack-name $GROUP-network --template-file infra/network.yaml \
  --parameter-overrides NamePrefix=$GROUP --tags Project=$GROUP

# Clean up your mess
aws ec2 revoke-security-group-ingress --group-id $APP_SG --protocol tcp --port 22 --cidr 0.0.0.0/0
# The hand change
$APP_SG = aws cloudformation describe-stacks --stack-name "$env:GROUP-network" `
  --query "Stacks[0].Outputs[?OutputKey=='ApiSecurityGroupId'].OutputValue" --output text
aws ec2 authorize-security-group-ingress --group-id $APP_SG --protocol tcp --port 22 --cidr 0.0.0.0/0

# Redeploy the template: CloudFormation says nothing changed, and the rule stays
aws cloudformation deploy --stack-name "$env:GROUP-network" --template-file infra/network.yaml `
  --parameter-overrides "NamePrefix=$env:GROUP" --tags "Project=$env:GROUP"

# Clean up your mess
aws ec2 revoke-security-group-ingress --group-id $APP_SG --protocol tcp --port 22 --cidr 0.0.0.0/0

CloudFormation only compares your template with what it remembers, not with reality. On real AWS, drift detection would flag that rule. Floci doesn't have it, which makes the point even louder: the template is the truth only if nobody touches the console.

Step 8: freeze. At the start of the defense block, everything freezes.

./checks/check.sh M5 | tee -a NOTES.md
git add -A
git commit -m "M5 freeze"
git push
$r = .\checks\check.ps1 M5
$r; $r | Add-Content NOTES.md
git add -A
git commit -m "M5 freeze"
git push
🧯 If it doesn't work
  • A stack fails: aws cloudformation describe-stack-events --stack-name $GROUP-app --query 'StackEvents[?contains(ResourceStatus,`FAILED`)].[LogicalResourceId,ResourceStatusReason]'. Fix the template, delete the failed stack, run rebuild.sh again.
  • No changes to deploy: that's fine, the stack already matches the template.
  • rebuild.sh stops at "image": Docker can't reach Floci's registry yet, wait 20 seconds after wipe.sh.
  • EntityAlreadyExists or already exists in steps 4 to 6 of the script: you ran it twice without wiping. Wipe, or delete that one resource.
  • The app URL doesn't answer right after the rebuild: containers start about 30 seconds after the stack is done.
πŸ“Έ On real AWS

The same two templates deploy on a real account, minus the Floci notes in comments: the app security group would reference the ALB's group, and the image would come from the ECR URI.
In the console, CloudFormation β†’ Stacks β†’ your stack β†’ Events shows every resource being created, Resources links to each one, and Drift detection lists the port 22 rule as MODIFIED.
In a real team, rebuild.sh becomes a pipeline: a commit on main runs the change set, someone reads it, and it executes.

🚚 CI/CD: from a commit to production

Deploys are risky, and a deploy from someone's laptop on a Friday evening is worse.
CI/CD takes the manual work out of it.

Continuous integration means every change pushed to Git is built and tested automatically, like a robot that checks every homework before it's handed in.
Continuous delivery means every change that passes can go live through the same automated path.

The pipeline is a few stages in a row, and each one only runs if the previous one passed:

Build once, promote the same image everywhere.
If you rebuild for production, production runs something you never tested.

πŸ” Want more? A real pipeline for your app

Here's what a GitHub Actions pipeline for your app could look like on real AWS. Floci can run inside GitHub Actions too, a nice extra to try, but read it as a design first.
123456789012 is AWS's placeholder account number for docs, and puff-app.yaml is the app template you'd get by growing today's stretch.

name: puff-api
on:
  push:
    branches: [main]

permissions:
  id-token: write      # lets the job get short-lived AWS credentials (OIDC), no stored keys
  contents: read

env:
  AWS_REGION: us-east-1
  IMAGE: 123456789012.dkr.ecr.us-east-1.amazonaws.com/puff-api

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:16
        env:
          POSTGRES_DB: puff
          POSTGRES_USER: puff
          POSTGRES_PASSWORD: test
        ports: ["5432:5432"]
    steps:
      - uses: actions/checkout@v4
      - name: Build the artifact
        run: docker build -t "$IMAGE:${{ github.sha }}" .
      - name: Integration test against a real PostgreSQL
        run: |
          docker run -d --network host -e DB_HOST=localhost -e DB_NAME=puff \
            -e DB_USER=puff -e DB_PASSWORD=test "$IMAGE:${{ github.sha }}"
          sleep 5
          curl -fsS localhost:8080/health
          curl -fsS -X POST localhost:8080/api/messages \
            -H 'Content-Type: application/json' -d '{"author":"ci","text":"hello"}'
          curl -fsS localhost:8080/api/messages | grep -q hello
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789012:role/puff-ci
          aws-region: ${{ env.AWS_REGION }}
      - name: Push the artifact
        run: |
          aws ecr get-login-password | docker login --username AWS --password-stdin "${IMAGE%%/*}"
          docker push "$IMAGE:${{ github.sha }}"

  deploy-staging:
    needs: build-and-test
    runs-on: ubuntu-latest
    environment: staging
    steps:
      - uses: actions/checkout@v4
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789012:role/puff-deploy-staging
          aws-region: ${{ env.AWS_REGION }}
      - run: |
          aws cloudformation deploy --template-file puff-app.yaml \
            --stack-name puff-app-staging \
            --parameter-overrides Env=staging ImageTag=${{ github.sha }}

  deploy-production:
    needs: deploy-staging
    runs-on: ubuntu-latest
    environment: production    # configured in GitHub to require a reviewer's approval
    steps:
      - uses: actions/checkout@v4
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789012:role/puff-deploy-production
          aws-region: ${{ env.AWS_REGION }}
      - run: |
          aws cloudformation deploy --template-file puff-app.yaml \
            --stack-name puff-app-production \
            --parameter-overrides Env=production ImageTag=${{ github.sha }}

Look at three things:

  • the same ${{ github.sha }} image goes to both environments,
  • each environment has its own IAM (Identity and Access Management) role, so a staging job can't touch production,
  • no AWS password or key is stored anywhere. The job gets short-lived credentials through OIDC (OpenID Connect, a way to prove "I'm this GitHub job" without a stored secret).

🎭 Deployment strategies

Once the new image exists, you need to swap it in without anyone noticing.
There are three usual ways to do it.

RollingBlue/greenCanary
HowReplace servers a few at a time (an instance refresh of the ASG, the Auto Scaling group)Build a full second fleet (green) next to the live one (blue), then switch all traffic at onceSend a small share of traffic (say 10%) to the new version, watch, then go to 100%
On PuffYour ECS service replaces 1 container at a time behind your ALBTwo target groups, puff-tg-blue and puff-tg-green, the ALB listener points at one, deploying means repointing the listenerSame two target groups, the listener splits traffic 90/10, then 0/100
Going backAnother rolling deploy of the old version (slow)Point the listener back at blue (seconds)Set the new version's share back to 0 (seconds)
Extra cost during the deployNoneDouble the servers for a whileA little
Watch outOld and new versions run at the same time, so the database must work with bothBlue and green share one database, so both must accept its structureYou need good alarms, or you won't see the 10% failing
πŸ—ΊοΈ Blue/green and canaryOpen full screen

On your platform, users reach your ALB, and its listener is the rule that decides where each request goes.
The listener points at a target group, which is a list of servers. Blue is the current Auto Scaling group, green is the new one, and both use the same database.

With blue/green, green gets built while blue still serves everyone, then the listener flips all traffic to green.
If something breaks you flip it back to blue, in seconds.

With canary, the same listener splits traffic by weight, 90% to blue and 10% to green, and you watch the alarms.
If they fire you set green back to 0, in seconds. If they stay quiet you move all traffic to green.

Blue/green and canary give you an instant way back by keeping the old version alive.
The database is what makes every strategy hard, because there's only one.

πŸš€ Ship a buggy releaseOpen full screen

πŸ’Έ FinOps: knowing what you pay for

In the cloud, whoever picks the server size is spending money, often without seeing the bill.
FinOps means engineers look at cost the way they look at errors and speed.

When your group defends its Puff, "what does it cost?" will be one of my first questions.

🎬 What does Puff cost? (1 min 20)

The usual cost surprises

πŸ” Want more? Pricing models
ModelWhat you commit toTypical saving vs On-DemandUse it for
On-DemandNothing, pay per second or hourNoneNew or unpredictable workloads, everything in this course
Savings PlansA \$/hour spend for 1 or 3 years, any instance typeUp to about 70%The steady base you're sure to run next year
Reserved InstancesOne instance type (and region) for 1 or 3 yearsSimilar to Savings PlansDatabases, if you want the deepest discount. Database Savings Plans exist too, 1 year, up to 20% on provisioned instances
SpotNothing, but AWS can take the server back with a 2-minute warningUp to about 90%Work that can be interrupted: batch jobs, CI runners, extra Auto Scaling capacity

For a real Puff, you'd cover the two always-on API servers and the database with commitments and let Spot absorb the peaks.

πŸ” Want more? Tagging and rightsizing

You can't cut what you can't see.
A tag like Project=puff (the one you added in step 7), Environment=staging or Owner=team-name lets the billing tools split the bill.

People miss two details, a tag must be switched on as a cost allocation tag in the billing console before it appears in reports, and it only counts from that day.
Tags added by hand get forgotten, so put them in the template (CloudFormation stack tags spread to the resources) or in Terraform's defaults.

Rightsizing means matching size to real use. Look at two weeks of CloudWatch CPU (memory needs the CloudWatch agent): if the peak stays well under 40%, try one size down.
Burstable t3 servers are a good default for mostly idle services like the board app, as long as they don't run out of CPU credits.

Separate AWS accounts per team or environment are the most reliable cost split, because you don't depend on anyone adding a tag.

Exercise: price your Puff per month

Open https://calculator.aws/, pick US East (N. Virginia), and add the services of the Puff you finished in course 5.
Assume 730 hours a month and low traffic.
Compare with the table below and save the calculator's share link, you'll reuse it in your project justification.

All prices below are rough public On-Demand us-east-1 prices, rounded, so check the calculator for today's numbers.

ItemAssumptionApprox. priceApprox. per month
EC2 t3.micro Γ— 2 (ASG min 2)730 h each\~\$0.0104/h\~\$15
EBS gp2 8 GB Γ— 2root volumes\~\$0.10/GB-month\~\$2
RDS PostgreSQL db.t3.micro, single-AZ730 h + 20 GB gp2\~\$0.018/h + \~\$0.115/GB-month\~\$16
Application Load Balancer730 h + \~1 LCU\~\$0.0225/h + \~\$0.008/LCU-h\~\$22
NAT gateway730 h + a few GB\~\$0.045/h + \~\$0.045/GB\~\$33
Public IPv4 Γ— 3NAT EIP + 2 ALB addresses\~\$0.005/h each\~\$11
S3 + CloudFronta few MB, little trafficmostly free tier\~\$1
CloudWatch alarms, SNS, Lambda2 alarms, a few emails, few invocations\~\$0.10/alarm, rest free tier\<\$1
Total\~\$100

(EBS is the disk attached to each server, an LCU is the ALB's unit of work.)

Look where the money goes, the NAT gateway, the ALB and public IPs make up about two thirds, the two API servers about a sixth.
What would you change if Puff hosted a side project with three users? And if it hosted 10,000?

🧾 Puff's monthly billOpen full screen

πŸ›Ÿ Disaster recovery in one table

DR (disaster recovery) is your plan for the day a whole region goes down, and two numbers define it:

Smaller numbers always cost more.

StrategyWhat runs in the backup regionRPORTOCost
Backup and restoreNothing, only backupsHoursHours to a day\$
Pilot lightData copied, the database running, app servers offMinutesTens of minutes to hours\$\$
Warm standbyA small but complete copy, scaled up when neededSeconds to minutesMinutes\$\$\$
Multi-site (active/active)The full stack serving traffic in both placesNear zeroNear zero\$\$\$\$

Today's work helps here.
With your network.yaml and app.yaml, "restore" means deploying them in another region and loading the latest backup, you don't rebuild by hand under stress.

Many companies also copy backups to a separate AWS account, so one bad mistake (or one stolen credential) can't delete everything.

πŸ›Ÿ Pick a disaster planOpen full screen

πŸ›οΈ Well-Architected recap: what you did on your platform

AWS's Well-Architected Framework is a checklist of six pillars for judging a cloud setup.
Here's how your platform scores, and it doubles as a checklist for your project justification.

PillarWhat it asksWhat you did on Puff
Operational excellenceCan you run and change it safely?Network and app in CloudFormation, one-command rebuild, change sets before updates, an alarm that pages you
SecurityIs the data and access protected?Private subnets, chained security groups (alb, app, db), DB password in Secrets Manager injected by an execution role, a least-privilege deployer role
ReliabilityDoes it survive failures and growth?2 AZs, an ECS service of 2 or more behind the ALB, the kill drill (known gaps: one NAT gateway, single-AZ RDS)
Performance efficiencyAre you using the right resources?CloudFront in front of the status page, your own autoscaler on a load metric, S3 gateway endpoint
Cost optimizationDo you pay only for what you need?t3.micro and db.t3.micro, Project tag, monthly estimate, deleting idle stacks
SustainabilityIs the footprint as small as it can be?Scale in when idle, small containers, and a wipe that leaves nothing running

🏁 Freeze and defense

At the start of the defense block everything freezes: each group pushes its repo with the check.sh M5 output in NOTES.md, and nobody changes the platform again.

Then you defend it in front of me, the way a platform team would: how it scales, how it stays available, how it recovers, what it costs and how it's secured.
Your pitch includes a live rebuild: ./wipe.sh, ./infra/rebuild.sh, and the app answers. Defenses run on a rolling order, 8 minutes per group. The Project page has the slot format and the grading.

🎲 Today's quiz

🎲 Today's quizOpen full screen

πŸ€” Think about it

πŸ’‘ Hints
  • That's drift, the next update may put back the template's version of that resource, or fail on it. The fix belongs in the template, the same day.
  • Replacement means a new, empty database. Think snapshots, and whether you really need that change.
  • During any rollout, old and new code talk to one database at the same time. Look up "expand and contract" migrations.
  • What do your private servers use the internet for? Endpoints, pre-built images, or a shared NAT.
  • One protects against a place failing, the other against a person or a stolen credential.

πŸ“š Go deeper

Back to the timeline