AWS Builder Center
 Weekend Productivity Challenge: ADR Generator

Weekend Productivity Challenge: ADR Generator

An AI-powered tool that generates complete Architecture Decision Records from a brief description, built with Amazon Bedrock, Lambda, and S3 in a weekend.

Cloud y seguridad desde una mirada de arquitectura.

Vision & What the App Does

Architecture Decision Records (ADRs) are essential for any engineering team, yet they're one of those things everyone agrees should exist but nobody wants to write. The friction of opening a blank document, remembering the correct format, and articulating alternatives and consequences means most decisions go undocumented.
ADR Generator solves this by turning a brief description into a complete, well-structured ADR in seconds. You provide a title (e.g., "Use PostgreSQL instead of MongoDB for payments"), a short context describing why the decision is needed, and optionally your tech stack and constraints. The AI generates a full ADR with all standard sections: Title, Date, Status, Context, Decision, Alternatives Considered, and Consequences.

From a user perspective, the flow is simple:
  1. Fill out a short form with your decision context
  1. Choose a detail level (Brief, Standard, or Detailed)
  1. Click "Generate ADR" and wait a few seconds
  1. Review the generated ADR rendered as formatted markdown
  1. Download it as a  .md  file ready to commit to your repo
The app also maintains a list of all your generated ADRs, lets you view any past decision, download it, or delete it when it's no longer relevant.

How You Built It

I followed a spec-driven development approach using Kiro, starting with formal requirements (user stories with acceptance criteria), then a technical design document, and finally a task list that guided implementation step by step.
Key decisions made during development:
  • S3 over DynamoDB for storage — ADRs are markdown files by nature. Storing them in S3 as actual  .md  files is more natural than serializing them into database fields. An  index.json  file in the bucket serves as the catalog.
  • Single Lambda, multiple handlers — Instead of deploying 4 separate Lambda functions, I used one Lambda with routing logic. This reduces cold starts (shared runtime), simplifies deployment, and keeps the codebase cohesive.
  • Client-side download — Rather than creating a separate download endpoint, the frontend generates the file from the already-fetched content using a Blob. No extra API call needed.
  • Dark theme with AWS branding — A navy + orange color scheme that feels professional and is immediately recognizable to anyone familiar with the AWS ecosystem.
Challenges encountered:
  • Partial failure handling — What happens if Bedrock generates the ADR successfully but S3 fails to save it? I implemented a  SaveFailedError  custom class that carries the generated content, allowing the frontend to show the ADR to the user with a "retry save" option. The HTTP 207 response code signals this state.
  • Front matter stripping — The stored markdown includes YAML front matter for metadata, but the viewer shouldn't display raw YAML to the user. A  stripFrontMatter  utility handles this cleanly.
  • Bedrock model compatibility — The service supports both Amazon Nova and Anthropic Claude models with different request/response formats, detected automatically by model ID prefix.

AWS Services Used / Architecture Overview

The application uses 5 AWS services:
Service
Role
AWS Amplify
Hosts the Next.js frontend (auto-deploy from GitHub)
AWS Lambda
Runs the backend business logic (1 function, 4 handlers)
Amazon API Gateway
REST API with CORS, routes requests to Lambda
Amazon S3
Stores ADR markdown files and the index catalog
Amazon Bedrock
Invokes Nova Lite model to generate ADR content
Architecture:

Infrastructure is defined as code using AWS SAM ( template.yaml ), deployable with a single  sam deploy  command. The template provisions the S3 bucket, Lambda functions with appropriate IAM policies, and the API Gateway with CORS configuration.

What You Learned

  • Amazon Bedrock is remarkably simple to integrate — With the AWS SDK, invoking a model is just a few lines of code. The Nova Lite model produces well-structured markdown output reliably, and the cost per generation is negligible (less than $0.01 per ADR).
  • Spec-driven development pays off for weekend projects — Having formal requirements and a design document before coding meant I never got stuck wondering "what should this do?" Every component had a clear spec to implement against.
  • SAM makes serverless deployment trivial — From zero infrastructure to a fully deployed API in one command. The  template.yaml  is readable, reproducible, and version-controlled.
  • Property-based testing reveals edge cases — Using fast-check to test the filename generation utility (slugify) caught edge cases I wouldn't have thought of: accented characters, trailing hyphens, mid-word truncation.
  • The 207 status code is underrated — It perfectly communicates "partial success" in a RESTful way, letting the client decide how to handle the situation.

Link to App or Repo



Built with Next.js, AWS Lambda, Amazon Bedrock (Nova Lite), AWS AmplifyApp and deployed using AWS SAM.


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