AWS Logo
Menu
How I Used AWS and Amazon Q to Build Celestes CCG

How I Used AWS and Amazon Q to Build Celestes CCG

Creating Celestes CCG, an online collectible card game (CCG) with a rich fantasy world, has been an incredible journey that combined strategic gameplay design with the power of Amazon Web Services (AWS) and the innovative tool Amazon Q.

Published Dec 12, 2024

Starting with a Vision and Building the Game

The game design began with the Unity 2D engine, where I implemented over 200 custom scripts, animations, and rich artistic elements. My focus was on creating an immersive player experience with strategic deck-building mechanics, captivating artwork, and a rewarding engagement loop for players.
However, building a scalable, secure online game required robust backend systems. That’s where AWS came into the picture, providing a suite of services to handle everything from user authentication to data storage.

Why AWS?

AWS was the perfect choice for hosting and managing Celestes CCG's backend because of its scalability, security, and the diverse range of services it offers. Here's a snapshot of the AWS services I used:
  • AWS Cognito: For secure user authentication and management.
  • AWS Lambda: To implement serverless functions that handle game logic efficiently.
  • AWS S3 and CloudFront: For storing and delivering the game's assets and WebGL builds.
  • AWS DynamoDB: To store persistent game data, such as user stats and card collections.

Enter Amazon Q

Initially, I wasn’t aware that participating in the AWS Game Builder Challenge required using Amazon Q, a powerful AI assistant designed to optimize development within AWS projects. Once I started using it, Amazon Q became a game-changer.
  1. Streamlining Development: Amazon Q simplified coding tasks by embedding relevant AWS knowledge directly into my development environment. For example, it assisted me in centralizing user authentication logic across multiple Lambda functions by suggesting the use of Lambda layers and optimizing existing code patterns.
  2. Identifying and Fixing Issues: Amazon Q’s ability to explain complex errors saved countless hours. For instance, it clarified why storing access keys in the client-side environment was a security risk and guided me toward better backend architecture.
  3. Reducing Cognitive Load: Its context-aware suggestions enabled me to implement best practices effortlessly, such as fetching sensitive credentials securely through Parameter Store rather than hardcoding them.
  4. Breaking Down Complex Components: One of the most impressive features of Amazon Q was its ability to help refactor my code. It broke down a massive, unwieldy React component into smaller, more modular files that adhered to object-oriented principles. This not only made the project easier to understand and maintain but also saved significant time in ensuring each new file aligned with clean coding standards.

Overcoming Challenges

The road wasn’t without its hurdles:
  • AWS Account Security: An incident where my account credentials were inadvertently exposed forced me to secure resources and regenerate access keys. This setback delayed my progress for almost a week during the already tight hackathon timeline. Amazon Q was invaluable in simplifying recovery tasks, such as refining IAM roles and policies. Despite the disruption, I’m relieved the security team identified the breach, as my AWS bills have significantly decreased after resecuring my account.
  • Accidental Deletion of Critical S3 Buckets: During a cleanup effort, I mistakenly deleted several S3 buckets that I didn’t recall creating. Unfortunately, these buckets were vital for my Serverless Application Model (SAM) deployments, CloudFormation infrastructure as code, and CloudFront distribution origins. Recreating these assets proved challenging, as it required revisiting skills I hadn’t practiced in some time. What started as 30 seconds of hasty action turned into several days of painstaking recovery.

Lessons Learned

Through this experience, I gained invaluable insights:
  1. AWS’s ecosystem is incredibly powerful, but its complexity demands a careful approach to resource management and security.
  2. Amazon Q significantly accelerated my workflow and enhanced my understanding of AWS services, transforming challenging tasks into manageable ones.
  3. Continuous learning and adaptability are key, whether it’s mastering new tools like Amazon Q or resolving unexpected challenges like account recovery.

The Outcome

The game is now accessible online, offering players a seamless experience with robust backend support. From managing secure logins to delivering dynamic game updates, AWS and Amazon Q have been instrumental in realizing Celestes CCG.
I encourage aspiring developers to explore AWS and Amazon Q. The tools may seem daunting initially, but their potential to transform ideas into reality is unparalleled. For me, it has been a journey of growth, resilience, and innovation, and I can’t wait to see how Celestes CCG evolves.
Check out the game here: celestesccg.ca.
 

1 Comment