AWS CDK Meets Bluey

Let’s build some Bluey Cloud Castles with AWS CDK
Hello fellow cloud enthusiasts. Do you ever feel like managing your AWS infrastructure is like wrangling a pack of hyperactive heelers? Scripts, configurations, JSON. It can be a fair dinkum mess. Let us grab our favourite bluey plush toys and settle in, because we’re about to explore the AWS Cloud Development Kit (CDK), your best mate for building and deploying cloud applications. Think of it as the magical “For Real Life” button for your infrastructure.
What’s the CDK, then? Is it like a fancy boomerang?
Not quite. The AWS CDK is a software development framework that lets you define your cloud infrastructure as code. Instead of clicking through endless console menus, you can use familiar programming languages like TypeScript, Python, Java, and more to describe your resources. This means you get all the benefits of software development like version control, testing, and reusable components. Think of it as writing a recipe for your cloud castle instead of trying to build it with LEGO instructions that are missing half the pieces. Let’s enter the world of Bluey and find out.
Bluey’s Backyard is Your AWS Account
It’s the space where all the magic happens. You can build anything you want there, from a simple swing set (a single EC2 instance) to a massive water park (a complex multi-service application).
The Heelers are Your Team
Bluey, Bingo, Chilli, and Bandit represent different parts of your development team. Each member has their own skills and responsibilities. Similarly, in your cloud project, different developers can work on different parts of the infrastructure using the CDK.
Playscripts are Your CDK Code
Just like Bluey and her family come up with elaborate games and plays, you write CDK code to define your infrastructure. These playscripts (your CDK code) describe the resources you need, how they’re connected, and their configurations.
Magic Claw is Your CDK CLI

The CDK CLI is your Magic Claw, the mysterious device that can grab anything. It takes your CDK code and transforms it into CloudFormation templates, which are then used to provision your infrastructure in AWS. It’s like the translator between your human instructions and the AWS language. CloudFormation is the underlying service that actually builds your infrastructure. It’s the construction crew that takes the blueprints (CloudFormation templates generated by the CDK) and makes them a reality. They’re the hard workers behind the scenes, making sure your cloud castle is built to code.
Why CDK is one of the best things that happened in AWS?
Let us revisit some of the favourite bluey things to understand CDK better.
Expressive — Shadowettes
When Bluey, Bingo, and Chilli play Shadowettes, making up the rules as they go. The CDK lets you do something similar with your infrastructure. You use languages like TypeScript or Python, languages you already know to describe what you want. It’s way easier than trying to explain a complicated game using only grunts and pointing like trying to manage infrastructure with just JSON.
Reusable — Play Scripts

Bluey’s always coming up with new games, but sometimes they reuse bits and pieces from old ones. Like when Keepy Uppy turns into The Quiet Game. With the CDK, you can create reusable bits of infrastructure code called constructs. These are like pre-written play scripts for common cloud games. If you need a website with a database all you need to do is to just grab the pre-built Website with Database construct and tweak it a bit. No need to invent the wheel every time!
Testable — Talent Show

When Bluey and Bingo practiced their dance for the talent show, they didn’t just wing it on the night. Similarly the CDK lets you write tests for your infrastructure code. This means you can make sure everything works before you deploy it. Just like practicing your floss so you don’t face-plant on stage, you can test your infrastructure so you don’t have a Sticky Gecko situation in production.
Version Controlled — Family Photo Album
Chilli always keeps the family photo album safe. With version control, your infrastructure code is safe too. Every change is tracked, so you can always go back to an older version if something goes wrong. It’s like having a record of every game the Heelers have ever played. No more lost LEGO instructions, no more accidentally deleting your cloud castle! And everyone on the team can work together on the same code, just like the Heelers work together to build an awesome cubby house.
The cloud is just someone else’s backyard, hopefully they’ve got a decent swing set, unlike our dodgy one. (Shared responsibility model and managing expectations of cloud providers).
Scaling up our infrastructure is like trying to get Bingo to share her toy — tricky, but worth it in the end. (Challenges and benefits of scaling cloud resources).
Debugging this cloud deployment is harder than getting Bluey and Bingo to agree on what game to play. At least with the CDK, we’ve got a play script. (Complexities of debugging and the value of having infrastructure as code for reproducibility and troubleshooting).
Next.js & NestJS Bluey Castle with AWS CDK
- Bluey is our front-end developer, master of all things user interface with Next.js.
- Bingo is our back-end developer, the architect of logic and APIs using NestJS.
- Bandit is our cloud engineer, wielding the AWS CDK like a pro to build the infrastructure.
- Chilli is our very own engineering manager, ensuring everyone stays on track and the cloud castle is built on time.
Episode — The Cloud Castle
Bluey and Bingo decide to build a magnificent cloud castle application. Bluey, with her artistic flair, wants a dynamic and interactive front-end. Bingo, ever the pragmatist, focuses on a robust and scalable back-end. Bandit, the experienced cloud engineer, steps in to make their dreams a reality using the AWS CDK. Chilli, naturally, keeps everyone from going completely bonkers.
Bluey starts sketching out the user interface using Next.js. She wants a landing page, a user dashboard, and a way to interact with the back-end APIs.
Bingo sets up the API endpoints using NestJS. She creates a simple API endpoint that Bluey can call.
Bandit uses the AWS CDK to define the infrastructure. He creates an API Gateway endpoint to expose Bingo’s NestJS API and an S3 bucket to host Bluey’s Next.js application. He uses the aws-cdk-lib/aws-apigateway
and aws-cdk-lib/aws-s3-deployment
modules.
Chilli oversees the deployment process. Bandit uses the CDK CLI (cdk deploy
) to provision the infrastructure. The Next.js app is built (npm run build
) and deployed to the S3 bucket. The NestJS API is packaged and deployed as a Lambda function, integrated with API Gateway.
Bluey and Bingo’s Bluey Castle is finally live. Users can access the Next.js front-end, interact with the API, and experience the magic of their creation. Chilli is happy, knowing the project was a success thanks to the teamwork and the power of the AWS CDK.
AWS CDK Cheatsheet — Bluey Edition
CDK is your For Real Life button
Turns your infrastructure dreams into reality using code. No more Shadowettes guesswork with JSON.
Constructs are your Keepy Uppy helpers
Reusable bits of infrastructure code. Like pre-made game rules, saving you time and effort.
Stacks are your Backyard Adventures
A collection of constructs that work together. Think of it as the whole backyard setup for a day of play.
Apps are your Big Bush Walks
The overall container for your stacks. Like planning the entire bush walk adventure, including all the stops.
CDK CLI is your Magic Claw
Grabs your code and turns it into CloudFormation templates. It’s the translator between your human instructions and AWS language.
CloudFormation is the Construction Crew
Builds your infrastructure based on the templates. They’re the hard workers behind the scenes, making sure your cloud castle is built to code.
Typescript/Python etc. are your Playscripts
The languages you use to define your infrastructure. Way easier than trying to explain a game with grunts and pointing!
cdk deploy
is your Ready, Set, Go!
Deploys your infrastructure to AWS. The moment you unleash your cloud creation.
cdk destroy
is your Tidying Up Time
Removes your infrastructure after testing just like cleaning up after a long day of play.
Think Bluey’s Backyard for your AWS account
It’s the space where all the magic happens. Build your cloud castles, swing sets, and water parks there. Just don’t let the sticky geckos get in the way by giving your S3 buckets unique names.

Hope all you bluey fans that are keen to learn about AWS CDK were able to relate and understand in a fun way. May be this could be a good way to explain some nerdy tech stories to kids.