AI Mystery Game: Building an Interactive AI-Powered Mystery Game with Amazon Bedrock
说明与用途
AI Mystery Game 展示了如何使用 Amazon Bedrock 和 AWS Lambda 构建一个浏览器游戏,动态生成谜题、提供提示并评估玩家答案,前端托管在 Netlify 上。
问题
Create a browser-based game that generates a new mystery each play, lets players investigate clues, request hints, and submit answers for AI evaluation.
结果
The game demonstrates how a single foundation model can support multiple interactive features via prompt engineering, and showcases a serverless architecture that separates frontend and backend.
工作流
- Build HTML/CSS/JS frontend with controls for category, difficulty, generate, hint, submit.
- Implement a single AWS Lambda Python function handling actions: generate, hint, check.
- Use Bedrock Converse API with Amazon Nova Lite to generate structured JSON for mysteries, hints, and evaluations.
- Expose Lambda via Amazon API Gateway HTTP endpoint.
- Configure CORS in API Gateway for Netlify frontend.
- Test Lambda independently with both API Gateway and console events.
- Deploy frontend on Netlify, backend on AWS.
- Run live demo.
证据
I built AI Mystery Game, a browser-based game that combines generative AI with interactive gameplay using Amazon Bedrock, AWS Lambda, and Amazon API Gateway.
The frontend is hosted on Netlify, while the backend processing and AI generation are handled by AWS.
I implemented the backend using Python in AWS Lambda.
I used Amazon Nova Lite to generate mysteries, create hints, and evaluate answers.
I configured Cross-Origin Resource Sharing (CORS) in API Gateway and redeployed the API.
- 记录日期: 2026-10-24T13:26:23.647Z