AWS Builder Center
MayurPShenoy_SubmissionforFreePassbyTanisha

MayurPShenoy_SubmissionforFreePassbyTanisha

An AI-powered AWS escape room game that teaches cloud incident response through five escalating rooms, a chaos engineering fault injection simulator, and an AWS Well-Architected Framework scorecard — built in a day with Kiro.

I Built an AI-Powered AWS Escape Room with Chaos Engineering

Introduction: The Problem

Learning AWS services through documentation and static courses is, frankly, boring. You read about S3 bucket policies, IAM least privilege, and Lambda timeouts — but none of it sticks because you never feel the pressure of a real incident. The traditional approach to AWS learning involves:
  • Hours of reading whitepapers and documentation
  • No sense of consequence when you make a wrong choice
  • Difficulty understanding how services connect in a real architecture
  • No way to practice incident response without a real AWS account
  • Zero feedback on whether your decisions are cost-efficient or well-architected
My Solution: Escape the Cloud — an AI-powered AWS escape room game that drops you into a Friday-evening production outage and challenges you to solve five AWS incidents with progressive AI hints, a chaos engineering mode, and a Well-Architected Framework scorecard. Built in a day with Kiro.



My Solution: An AI-Powered AWS Escape Room

Escape the Cloud is a browser-based game where you're the only engineer online at 5:42 PM on a Friday. Production is down, your manager is unreachable, and the cloud console "blinks like it knows something." You have five incidents to solve — and this time, getting the answer wrong has consequences you can see.
The game teaches AWS concepts through consequences, not lectures. Choose  AdministratorAccess  to solve an AccessDenied error? The security team enters the chat. Open an S3 bucket to  s3:*  for everyone? Your bucket becomes a public photo gallery. Every wrong answer comes with a witty failure message and a hit to your stability scores.



Architecture Overview

Tech Stack

Layer
Technology
Framework
Next.js 16 (App Router, Turbopack)
Language
TypeScript 5
UI
React 19 + Tailwind CSS 4
Animation
Framer Motion 12
Icons
Lucide React
AI Backend
OpenAI-compatible)
Audio
Web Audio API (browser-native, no audio files)
Image Export
Canvas API (survivor badge generation)
The game requires no infrastructure: no AWS account, no database, no auth, no leaderboard infrastructure. The AI assistant gracefully falls back to mock hints when no API key is configured, so the entire game is playable offline.
Browser (GameApp)
│
├── Game screens (Home → Story → Game → Victory)
├── Rooms (Choice, Logs, Architecture + Chaos Mode)
├── Well-Architected Radar + Cost Ticker + Share Card
│
▼ fetch
Next.js API Route (/api/assistant)
│
├── Mock mode → static hints (no API key)
└── API mode → OpenCode Zen (progressive AI hints + debrief)



Key Features

1. Five Incident Rooms with Cyberpunk Visuals

Each room teaches one core AWS concept through an immersive cyberpunk escape room viewport with holographic spirit companions:
The S3 room teaches least-privilege public read policies. The IAM room teaches scoped permissions instead of  AdministratorAccess . The Lambda room teaches timeout and memory trade-offs. The CloudWatch room teaches log filtering and root-cause analysis.
Every room has a holographic spirit — a Storage Sentinel, Security Specter, Lambda Spark, or Edge Messenger — that floats beside the viewport and presents the problem. Cyberpunk scanlines, a HUD top bar, and animated cloud particles create an atmosphere that feels nothing like a training module.




2. Five Randomized Incident Variants

Every playthrough randomly selects one of five incident scenarios, each with unique room content and architecture layouts:
  • Static Site Outage — Marketing pages return blank screens
  • API Latency Spike — Checkout API throws 504 errors under peak load
  • IAM Permission Failure — Order service crashes after a security migration
  • Queue Backlog — PDF invoice generators go offline, SQS backs up
  • Database Throttling — DynamoDB writes fail during a flash sale
This means the game is replayable — the same room teaches different lessons depending on which incident variant you draw.

3. AI-Powered Progressive Hints

The assistant panel lets players ask for hints at three progressive levels:
  • Level 1 — Gentle nudge ("Start by asking who needs access and what action they need")
  • Level 2 — Narrows the concept ("The website only needs to read objects, not delete or list them")
  • Level 3 — Specific but never the exact answer ("Look for a policy scoped to s3:GetObject on the product image objects")

The AI is system-prompted to refuse direct answers. If you ask "what's the answer?" it gives you a diagnostic clue instead. It remembers conversation context and can explain AWS trade-offs — like why caching payment authorization responses is a terrible idea.

4. Drag-and-Drop Architecture Puzzle with Chaos Mode

This is the standout feature. After solving four incidents, players rebuild the production architecture by dragging AWS services into labeled bays:

Once validated, Chaos Mode unlocks — a fault injection simulator inspired by AWS Fault Injection Service (FIS) and the Well-Architected Framework's recommendation to "conduct game days regularly" (REL12-BP05).
Players inject faults like "Kill Lambda," "Throttle DynamoDB," "Purge SQS Queue," "S3 Outage," or "CloudFront Disruption" — and watch traffic paths turn red and dashed in real time:
Each fault shows the real-world consequence: "API Gateway returns 502 Bad Gateway. All compute processing stops." This teaches cascading failure — kill Lambda and both the DynamoDB and SQS paths break, because Lambda is the compute bridge between them.
The faulted service cards pulse red with a "FAULT" badge, and the animated data-flow particles stop on broken paths. It's the kind of visual feedback you wish you had during a real 3 AM incident.

5. AWS Well-Architected Framework Radar Chart

The victory screen renders a hexagonal SVG radar chart scoring the player across all six pillars of the AWS Well-Architected Framework:

The game's four internal scoring axes (Security, Cost, Architecture, Problem Solving) map onto the six pillars:
  • Operational Excellence ← Problem Solving
  • Security ← Security
  • Reliability ← Architecture + Problem Solving
  • Performance Efficiency ← Architecture
  • Cost Optimization ← Cost
  • Sustainability ← Cost + Architecture
This was a deliberate design choice. AWS speakers constantly reference the Well-Architected Framework — so scoring the player against it makes the game feel like an official AWS assessment rather than a toy.

6. Live Monthly Cost Ticker

The top bar shows a real-time  $X.XX/mo  badge that moves with every decision:
Good cost choices keep the bill near ~$77/mo (efficient serverless). Bad choices — like raising reserved concurrency instead of fixing a timeout, or enabling API Gateway caching on payment authorization — inflate it toward ~$450/mo. The ticker uses rough real-world AWS pricing and is color-coded green/amber/red.
This turns the abstract "cost" axis into a tangible number. Players don't just see "cost score: 45" — they see "$312.50/mo" and immediately understand the impact of their choices.

7. Downloadable Survivor Badge

At the end of the game, players can download a 1200×630 PNG survivor badge generated entirely in-browser via the Canvas API — no dependencies, no server:

The badge includes:
  • "I survived the [incident variant name]"
  • AWS branding
  • Score, time, estimated bill, hints used
  • All six Well-Architected pillar scores
  • Top achievements
Perfect for sharing on LinkedIn or Twitter — which is, let's be honest, the whole point of building something shareable.

8. AI-Powered Incident Debrief

The victory screen includes an AI-generated Incident Debrief Report — a personalized after-action review that addresses:
  1. What you fixed
  1. AWS concepts practiced
  1. One improvement suggestion
  1. An authoritative "Incident Commander" closing line
This mirrors the after-action reports (AARs) that AWS recommends after game days.

9. Browser-Generated Sound Effects

All sound effects — start, correct, wrong, hint, victory, toggle — are generated programmatically via the Web Audio API. No audio files, no CDN, no bandwidth. Just oscillators and gain nodes.



How Kiro Accelerated Development

Spec-Driven Development

Kiro's spec system allowed me to define the incident rooms, scoring rules, and chaos mode behavior upfront, then iterate systematically:
  • Well-Architected pillar mapping — I described the six-pillar mapping and Kiro generated the  well-architected.ts  module with the calculation logic, cost estimation model, and fault scenario definitions.
  • Radar chart — I described "a hexagonal SVG radar chart with grid lines at 25/50/75/100, a filled data polygon, and labeled axes" and Kiro produced a working  WellArchitectedRadar  component with correct trigonometry.
  • Chaos Mode state machine — I described the fault injection flow (validate → unlock chaos → inject faults → render broken paths → complete recovery) and Kiro wired up the full  useState  flow with fault tracking and visual feedback.
  • Survivor badge — I described the 1200×630 canvas layout with score, pillars, and achievements, and Kiro generated the complete Canvas draw code with gradients, grid overlays, and text rendering.

Rapid Feature Implementation

With Kiro, implementing complex features took minutes instead of hours:
Feature
Before Kiro
With Kiro
Well-Architected pillar mapping
Manual research + hand-coded calculation
Spec → generated  well-architected.ts 
Radar chart SVG
Trial-and-error with viewBox math and trigonometry
Described hexagonal radar → working SVG component
Chaos Mode state machine
Manual  useState  wiring + debugging cascade logic
Spec → complete fault injection flow with visual feedback
Survivor badge canvas
Research Canvas API + manual coordinate math
Described layout → generated complete draw code
Cost estimation model
Manual pricing lookup + formula derivation
Spec with pricing tiers → generated linear interpolation estimator

Real-Time Problem Solving

When the architecture room's drag-and-drop needed to support faulted state visualization, Kiro quickly identified that the  ArchitecturePath  component needed a  faults  array prop and that the  isPathActive  function should return  false  for any path touching a faulted service. The broken-path rendering (red, dashed strokes) was implemented in one pass.

Pattern Recognition

Kiro understood the existing cyberpunk visual design system and matched new components to established patterns:
  •  ChaosPanel  uses the same  panel  class, amber accent colors, and Framer Motion animations as existing components
  •  CostTicker  matches the  Metric  component's border + padding style
  •  WellArchitectedRadar  uses the same cyan glow color palette as the architecture floor



Project Structure

src/
├── app/
│ ├── api/assistant/route.ts AI hint endpoint (mock + OpenCode Zen)
│ ├── globals.css Tailwind theme + custom styles
│ ├── layout.tsx Root layout with Geist fonts
│ └── page.tsx Game entry
├── components/
│ └── GameApp.tsx Main game (all screens, rooms, chaos, radar, share card)
├── lib/
│ ├── aws-services.ts AWS service metadata, icons, colors
│ ├── game-data.ts Base incident rooms + 50 failure messages
│ ├── incident-variants.ts 5 randomized incident scenarios
│ ├── scoring.ts Score calculation, axis impacts, achievements
│ ├── sfx.ts Web Audio API sound effects
│ └── well-architected.ts Pillar calc, cost estimation, fault scenarios
└── types/
└── game.ts Shared TypeScript types



User Flow

Home Screen
│
▼
Start Incident ──► Random variant selected (1 of 5)
│
▼
Story Screen ("Friday, 5:42 PM. Everyone has gone home. Production goes down.")
│
▼
Room 1: S3 Policy (choice) ──► Room 2: IAM (choice) ──► Room 3: Lambda (choice) ──► Room 4: CloudWatch (logs)
│ │
▼ ▼
Room 5: Architecture Build (drag-and-drop)
│
▼ (validate)
Chaos Mode (inject faults → watch paths break → complete recovery)
│
▼
Victory Screen
├── Stats + Achievements
├── Well-Architected Radar Chart (6 pillars)
├── AI Debrief Report
├── Cost Ticker summary
└── Downloadable Survivor Badge PNG



Key Technical Decisions

1. Zero Infrastructure Required

The entire game runs in the browser. No AWS account, no database, no auth. The AI assistant falls back to mock hints when no API key is configured. This makes the game:
  • Instantly playable (just  npm install && npm run dev )
  • Free to host (static + one API route)
  • Easy to demo anywhere

2. Seeded Randomization for Replayability

All option shuffling and log ordering uses a custom seeded PRNG (FNV-1a hash + Linear Congruential Generator). This ensures:
  • The same round seed produces the same shuffle (reproducible)
  • Different rounds produce different orderings (replayable)
  • No dependency on a random number library

3. Pure SVG Radar Chart (No Charting Library)

The Well-Architected radar chart is rendered as a pure SVG hexagon with computed coordinates. No Recharts, no Chart.js, no D3. This keeps the bundle small and the rendering crisp at any resolution.

4. Canvas API for the Survivor Badge (No Dependencies)

The downloadable PNG is generated via the Canvas 2D API —  createElement("canvas")  +  getContext("2d")  +  toDataURL() . No  html-to-image , no  dom-to-image , no server-side rendering. The entire 1200×630 badge with gradients, grid overlays, and text is drawn in ~80 lines of code.

5. Web Audio API for Sound (No Audio Files)

All sound effects are generated programmatically using oscillators and gain envelopes. A "correct" sound is a C-E-G arpegration with sine waves. A "wrong" sound is a descending sawtooth. This means zero audio file downloads and zero CDN costs.



Results & Impact

The game ships with:
  • 5 incident rooms × 5 randomized variants = 25 unique playthroughs
  • 6 Well-Architected pillars scored with a hexagonal radar chart
  • 5 FIS-style chaos faults with real-time visual path breaking
  • 50 witty failure messages for wrong answers
  • 7 achievements based on scoring thresholds
  • 1 downloadable survivor badge for social sharing
  • 0 external dependencies beyond the core stack (Next.js, React, Tailwind, Framer Motion, Lucide)



Lessons Learned

  • Games Teach Better Than Dashboards — Putting AWS concepts in an escape room context with consequences, humor, and pressure makes them stick. "Your S3 bucket became a public photo gallery" is more memorable than "policy too permissive."
  • Chaos Mode Is the Hook — Watching traffic paths break when you kill a service is viscerally satisfying. It teaches cascading failure in a way that no diagram can.
  • Well-Architected Framework Is Free Marketing — Mapping scores to the six pillars makes the game feel official. AWS speakers reference the framework constantly — this game speaks their language.
  • Progressive Hints > Direct Answers — The AI assistant refusing to give answers and instead offering diagnostic clues forces players to think. It's the Socratic method applied to AWS incident response.
  • Zero-Friction Demos Win — No AWS account needed means anyone can play instantly. Friction is zero.
  • Spec-Driven Development Keeps You Focused — Kiro's spec system kept development organized. I defined the chaos mode behavior, pillar mapping, and badge layout as specs, then implemented against them.



Future Enhancements

  • Amazon Bedrock backend — Add a second AI path via Bedrock for pure-AWS inference
  • DynamoDB leaderboard — Optional server-side score persistence for competitive play
  • More incident variants — RDS failover, VPC misconfiguration, KMS key rotation, Step Functions orchestration
  • AWS CLI terminal easter egg — Type  aws s3api get-bucket-policy  for bonus hints
  • Region selector — Pick  us-east-1 ,  ap-south-1 ,  eu-west-1  with consequences on cost and incident flavor
  • Multiplayer chaos mode — Collaborative fault injection with real-time sync via WebSocket
  • Postmortem export — Download a Markdown after-action report (AAR) from the victory screen
  • AWS BuilderCards-style collectibles — Unlock a service card per room solved; show a deck on victory



Conclusion

Escape the Cloud demonstrates how gamification, AI, and chaos engineering can transform AWS learning from a passive reading exercise into an engaging, consequential experience. With Kiro's assistance, I built a production-ready game that:
  • Teaches five core AWS concepts through immersive incident rooms
  • Tests architecture resilience with a fault injection simulator inspired by AWS FIS
  • Scores players against the official AWS Well-Architected Framework
  • Translates decisions into a real-dollar monthly cost estimate
  • Generates a shareable survivor badge for social media
The chaos mode is the feature I'm most proud of. Watching traffic paths break in real time when you kill a Lambda function is the kind of visceral learning that no documentation page can deliver. It's AWS game days, distilled into a browser game.
Built with ❤️ using Kiro.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article