Inspiration
If you're a developer, you know this moment all too well.
Your Lambda function fails in production. You open CloudWatch. You're met with walls of cryptic log lines, timestamps, request IDs, and stack traces that seem written in a language only AWS understands.
WHY DID MY PROJECT FAIL?
WHAT DOES THIS ERROR EVEN MEAN?
Hours pass. Coffee goes cold. You're ctrl+F-ing through hundreds of log lines trying to find the one that tells you what actually went wrong. And when you finally find the error, you still don't know why it happened or how to fix it.
This is the daily reality for developers working with AWS Lambda. I've lived this pain myself, and I wanted to build something that actually fixes it.
What it does
LambdaLens is an AI-powered Lambda debugging copilot. You run one command:
lambda-debug --function my-function --region us-east-2 --hours 24
Within seconds it fetches your Lambda metadata and CloudWatch logs, sends everything to Amazon Nova 2 Lite via Bedrock for analysis, and opens a beautiful diagnostic report in your browser showing:
- Overall health assessment of your function
- Every detected error with severity level
- Plain English explanation of what happened
- Root cause of each issue
- A ready-to-use fix: corrected code patterns, exact IAM policy JSON, or specific configuration changes depending on the error type
- The exact log lines that triggered each error
No more guessing. No more hours lost. Just clear answers.
How I built it
LambdaLens is built entirely in Python and integrates deeply with the AWS ecosystem.
Core stack:
- Amazon Nova 2 Lite via Amazon Bedrock: The reasoning brain that analyzes logs and generates targeted fixes
- boto3: Fetches Lambda metadata and CloudWatch log streams using existing AWS credentials
- Click: Powers the clean CLI interface
- FastAPI + Uvicorn: Serves the diagnostic report locally at localhost
- Jinja2: Renders the report HTML with real diagnosis data
- Tailwind CSS + Alpine.js: Makes the report beautiful and interactive
- Rich: Makes terminal output clean and readable
The architecture is intentionally simple and layered. The fetcher pulls data from AWS, the analyzer sends it to Nova 2 Lite and returns a structured JSON diagnosis, and the server renders that into a visual report that opens automatically in the browser.
Challenges I ran into
Prompt engineering for structured output
Getting Nova 2 Lite to consistently return well structured JSON with specific fields for each error type took significant iteration. The key was being extremely explicit about the exact JSON structure expected, and adding robust parsing logic to handle edge cases where Nova occasionally wraps responses in markdown code blocks.
Balancing specificity vs generality
Lambda functions can fail in hundreds of different ways. Designing a single prompt that produces genuinely specific fixes covering IAM errors, runtime exceptions, timeouts, and memory issues, while giving Nova enough context about the function's configuration, was one of the trickier parts of building LambdaLens.
Coordinating CLI, server, and browser
Getting the browser to open at exactly the right moment after uvicorn starts required solving a timing problem using Python's threading module with a carefully tuned delay.
Accomplishments that I am proud of
- Built a tool that solves a real, daily developer pain that millions of AWS developers face
- Designed a prompt that gets Nova 2 Lite to generate genuinely specific, actionable fixes; not generic advice
- Created a zero-friction developer experience that requires no new credentials, no new accounts, and no extra setup
- Built a privacy-first tool where logs never leave the developer's own AWS environment
- Produced a beautiful, readable diagnostic report that makes complex log analysis accessible to developers of all experience levels
What I learned
- How to design effective prompts for structured AI output using Amazon Nova 2 Lite
- How Amazon Bedrock's invoke model API works and how to parse its response correctly
- How to build a Python CLI tool that installs as a real terminal command using setuptools entry points
- How boto3's credential chain works and why it's the right approach for developer tools
- The importance of prompt specificity when asking an LLM to return structured JSON data
What's next for Lambda Lens
The foundation is solid. The potential goes much further.
Multi-function fleet analysis: Analyze all Lambda functions in your account at once and get a health dashboard ranked by severity. Identify systemic issues across your entire serverless infrastructure.
Expanding beyond Lambda: While LambdaLens currently focuses on Lambda, the same AI-powered diagnosis engine could be extended to analyze any CloudWatch log source; from API Gateway errors to RDS slow queries to ECS container crashes. One tool to debug your entire AWS infrastructure."
CI/CD integration: Run LambdaLens as part of your deployment pipeline to automatically catch issues after every deploy before they reach users.
IDE plugin: Bring the same debugging intelligence directly into VS Code so developers never have to leave their editor.
Built with using Amazon Nova 2 Lite for the Amazon Nova AI Hackathon.
Log in or sign up for Devpost to join the conversation.