
Build an Action Game to Learn AWS Security in a Fun Way with Amazon Q CLI
I build a game called "AWS Security Defender Game" using Amazon Q CLI! Let's protect your AWS environment from various security threats!
Published Jun 9, 2025
There was an interesting campaign about Amazon Q CLI.
If I build a game with Amazon Q CLI and publish a blog or video, I can get a limited T-shirt, so I tried it right away.
If I build a game with Amazon Q CLI and publish a blog or video, I can get a limited T-shirt, so I tried it right away.
You can interact with other builders and get support on Discord, so if you're interested, join us.
### Environment preparation
Create an AWS Builder ID.

Install Amazon Q CLI.
There are procedures for each OS, so please refer to them.
There are procedures for each OS, so please refer to them.
Linux
Windows
This time, I used the Windows WSL environment.
As you go through the steps, you will be able to run the installer.
As you go through the steps, you will be able to run the installer.
When running the installer, you will be asked questions, so answer them as follows.
- Do you want to add it to the shell variable? → Yes
- How do you want to change the login method? → Use for Free with Builder ID
Then a URL with the authentication code will be issued, so open it in your browser and continue.

You will be asked if you want Amazon Q Developer for command line to access your data, so allow it.

Your request has been approved.

You can confirm that q cli starts successfully by running the following command from WSL.

Next, install PyGame, a library required for game development.
If you have trouble with dependencies, you can ask Q to do it for you.


### Try developing a game with Amazon Q CLI
When you're not sure what to make, it's a good idea to ask Q to think about it.
It looks good, so I asked Q to make it with this idea.
Then, Q created the game in no time.
After that, I played the game and made small modifications to complete it.
### Finished game
This game is called "AWS Security Defender Game".

Players become security officers in the AWS cloud environment and protect resources from various security threats.
Use the right security tools to defeat threats and get points.
Use the right security tools to defeat threats and get points.
Each level features a different threat that you need to deal with using the right security tools.
If you defeat the threat correctly, you get 100 points, and if you miss it, you lose 50 points.
If you defeat the threat correctly, you get 100 points, and if you miss it, you lose 50 points.
The code is available on GitHub.
### Summary
I was able to easily build a game using Amazon Q CLI.
It's amazing that I was able to build something that works just by interacting with Q without doing any coding.
Depending on how you devise the prompts, you may be able to build an even more amazing game.
Please take this campaign as an opportunity to try out Amazon Q CLI.
It's amazing that I was able to build something that works just by interacting with Q without doing any coding.
Depending on how you devise the prompts, you may be able to build an even more amazing game.
Please take this campaign as an opportunity to try out Amazon Q CLI.