AWS Builder Center
Weekend Creative Challenge: Ye Olde Stack Trace

Weekend Creative Challenge: Ye Olde Stack Trace

Ever faced a scary NullPointerException at 4:45 PM on a Friday? Ye Olde Stack Trace is a serverless web app that converts frightening software error logs into hilarious 17th-century high-seas pirate ship logs or 14th-century mediaeval court ballads! Powered by Amazon Bedrock (Nova Micro), AWS Lambda Function URLs, and AWS Amplify Hosting, this app turns developer panic into creative lore and team laughter.

Engineering software solutions for big real-world impact.

Vision & What the App Does

Every software engineer knows the sudden, gut-wrenching feeling of encountering a catastrophic runtime failure at 4:45 PM on a Friday. You are staring at a wall of red text in your terminal:  java.lang.NullPointerException ,  500 Internal Server Error , or  Fatal error: Uncaught TypeError . Debugging under pressure often turns what should be a creative problem-solving process into a stressful ordeal.
Ye Olde Stack Trace was born out of a simple premise: What if we could turn developer panic into comedic lore?
Instead of forcing developers to stare at scary, cryptic console outputs, Ye Olde Stack Trace takes raw error logs and translates them into either:
  1. 17th-Century High Seas Pirate Lore: Where a memory leak becomes a leak in the starboard hull and a  NullPointer  is a mutinous ghost captain plundering your registers.
  1. 14th-Century Medieval Court Bard Ballads: Where an out-of-memory error becomes a tragic famine in the king's grand vault, sung in dramatic rhyming verse.
By reframing technical failure through absurd storytelling, Ye Olde Stack Trace transforms moments of developer frustration into lighthearted moments of creative play and shared laughter across engineering teams.



How I Built It

The design goal for Ye Olde Stack Trace was to create a zero-maintenance, serverless application capable of delivering near-instant creative text transformations with low latency and zero cold-start friction.
  1. Persona Prompt Engineering with Amazon Nova Micro The heart of the application relies on Amazon Bedrock powered by the Amazon Nova Micro foundational model. During initial prototyping in the Bedrock Console, I experimented with persona conditioning. To keep response times blazing fast while maintaining high comedic quality, I structured light system prompts that enforce two strict rules:
  • Adopt a deeply immersive 17th-century pirate or 14th-century medieval bard persona.
  • Limit outputs to 3–5 sharp, creative sentences that map technical concepts (memory, pointers, HTTP codes) directly to narrative equivalents (sea voyages, royal vaults, plagues).
  1. Serverless Backend Pipeline I built a lightweight Python 3.12 AWS Lambda function using  boto3 . The function extracts the error string and selected mode from the incoming HTTP request payload, constructs a JSON payload for Amazon Bedrock's  invoke_model  API, and returns the generated story back to the client. To keep the architecture lean and avoid unnecessary provisioning overhead, I bypassed Amazon API Gateway and exposed the Lambda function directly using an AWS Lambda Function URL.
  1. Frontend Architecture & AWS Hosting The frontend is a single-page web app built with semantic HTML5, responsive CSS styled like an ancient parchment scroll, and vanilla asynchronous JavaScript ( fetch  API). The static frontend repository is connected to AWS Amplify Hosting, providing automated CI/CD builds directly from GitHub alongside managed SSL certificate provisioning.



AWS Services Used/Architecture Overview

The entire application runs on a 100% serverless, cloud-native architecture utilizing AWS Free Tier services:
  • Amazon Bedrock ( amazon.nova-micro-v1:0 ): The core generative AI foundation model used for creative persona translation.
  • AWS Lambda: Provides event-driven, pay-per-use Python 3.12 execution logic, securely interfacing with Bedrock APIs via a public Lambda Function URL.
  • AWS Amplify Hosting: Delivers automated static site web hosting, continuous deployment git-triggers, and edge CDN distribution for the web UI.




Technical Challenges Encountered & How I Overcame Them

Building a seamless serverless pipeline always brings edge-case learning opportunities. Here are the three main technical roadblocks encountered during development and how they were solved:
Challenge 1: The Duplicate CORS Header Trap (, )**
The Problem: When wiring the frontend on AWS Amplify to the backend Lambda Function URL, the browser blocked cross-origin preflight requests with the error: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.
Root Cause Analysis: Both the AWS Lambda Console settings ("Configure CORS") and the custom Python code inside lambda_handler were injecting Access-Control-Allow-Origin: *. AWS Lambda merged these duplicate declarations into *, *, which strict browser CORS security policies instantly reject.
The Solution: I resolved this by disabling CORS configuration at the AWS Lambda Console metadata level and explicitly handling the exact HTTP headers (Access-Control-Allow-Origin, Access-Control-Allow-Headers, Access-Control-Allow-Methods) directly within the Python response dictionary returned by the function.
Challenge 2: The Default Lambda Timeout Threshold
The Problem: On initial testing, the browser threw generic network fetch errors during cold starts.
Root Cause Analysis: AWS Lambda functions default to a 3-second execution timeout. When Amazon Bedrock performed initial model invocation on a cold execution environment, execution time briefly exceeded 3 seconds, causing Lambda to terminate the request abruptly before returning headers.
The Solution: I updated the Lambda function configuration, raising the timeout limit from 3 seconds to 15 seconds, giving the Bedrock runtime API ample buffer room during cold starts.
Challenge 3: Eliminating Infrastructure Overhead
The Decision: Rather than provisioning a multi-component stack (API Gateway, CloudFront, Route53), I deliberately restricted the architecture to Lambda Function URLs + AWS Amplify. This choice reduced API latency, eliminated route-mapping boilerplate, and kept total deployment time under 30 minutes.



What I Learned

Participating in this weekend challenge provided valuable hands-on insights into modern AWS serverless development and generative AI patterns:
Amazon Nova Micro Performance: Amazon Nova Micro in Bedrock is surprisingly fast and remarkably cost-effective. For lightweight text-transformation tasks, it delivers near-instant inference speed that fits interactive web applications seamlessly.
Mastering Lambda Function URL Behaviors: I gained a deeper appreciation for how CORS header propagation works when dealing with Lambda Function URLs versus API Gateway proxies.
The Agility of AWS Amplify: Connecting a public GitHub repository to AWS Amplify Hosting allowed me to go from a local index.html file to a globally accessible HTTPS web application in under two minutes.
Developer-Centric AI Applications: Generative AI doesn't always have to solve massive enterprise data problems - sometimes, creating simple, funny tools that improve developer morale is the most rewarding build of all.



Link to App or Repo

Visual Proof:
User Interface Image 1

User Interface Image 2

AWS Amplify Interface

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article