AWS Networking Quiz Game: Building with AI Assistance

The AWS Networking Quiz is an educational game designed to test and reinforce knowledge of AWS networking concepts. I chose this particular game format for several reasons:
• Educational Value: AWS networking is a fundamental skill for cloud professionals, but the concepts can be complex. A quiz format makes learning interactive and engaging.
• Practical Application: The game reinforces critical knowledge needed for AWS certifications and real-world cloud architecture.
• Accessibility: The command-line format makes it accessible to technical users without requiring graphics or complex interfaces.
• Extensibility: The question-based structure makes it easy to expand with more questions or additional AWS topics in the future.
Effective Prompting Techniques Discovered
During development, I discovered several effective prompting techniques when working with Amazon Q CLI:
Be specific about structure: Requesting a "quiz game with 5 single-choice questions" provided clear parameters for the AI to work with.
Request explanations: Asking for "descriptions/explanation as comment" resulted in well-documented code that explains the logic behind each section.
Iterative refinement: Breaking down requests into stages (first creating the basic program, then adding comments, then preparing content for a blog post) produced better results than asking for everything at once.
Provide context for purpose: Mentioning that the content was "for my blogpost" helped the AI understand the intended audience and format needed.
Clear formatting requests: Specifying exactly what topics to cover in the blog post ensured comprehensive coverage of all desired aspects.
How AI Handled Classic Programming Challenges
The AI effectively addressed several classic programming challenges in this project:
Data Structure Design: The AI created an efficient question structure using dictionaries within a list, making it easy to store and access question text, options, correct answers, and explanations.
Input Validation: The program includes a robust input validation loop that ensures users can only enter valid options (A, B, C, D), with clear error messages for invalid inputs.
Randomization: Using Python's random.shuffle() function to randomize questions ensures variety each time the quiz is played.
State Management: The program tracks the user's score throughout the quiz and provides appropriate feedback based on performance.
User Experience Flow: The AI implemented appropriate timing (with time.sleep()) and visual separators to create a smooth, readable experience.
Examples of Development Automation That Saved Time
Working with Amazon Q CLI on this project saved significant development time through:
Complete Code Generation: The entire functional program was generated in one go, eliminating the need to write boilerplate code or basic logic structures.
Automatic Documentation: Comprehensive comments were added throughout the code, saving the time typically spent on documentation after development.
Content Creation: The AI generated both the technical implementation and supporting content for the blog post, streamlining the entire project workflow.
Error Prevention: The AI anticipated potential issues (like input validation) and implemented solutions proactively, reducing debugging time.
Knowledge Integration: The AI incorporated accurate AWS networking concepts into the questions and explanations, eliminating research time that would have been needed to verify technical details.
By leveraging AI assistance, what might have been a multi-hour development project was completed in minutes, with professional-quality code and documentation ready for immediate use and sharing.
It’s simple to run the quiz game using any cli with python installed.
Github link : https://github.com/devopssourav/aws_networking_quiz_game.git
Subscribe to my newsletter
Read articles from Sourav Chakraborty directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
