AWS Builder Center
Weekend Annoying Task Challenge: LearningPath AI

Weekend Annoying Task Challenge: LearningPath AI

I was wasting hours every week deciding what to learn next -scrolling through courses, bookmarking tutorials I'd never finish, and feeling guilty about inconsistency. So I built LearningPath AI to make that decision for me, using Amazon Bedrock and serverless AWS.

Community Builder and Browserstack Champion
Every Sunday evening I used to do the same thing: open YouTube, type "best courses for cloud computing 2024," and disappear into a rabbit hole of reviews, comparisons, and Reddit threads. Two hours later I'd have seventeen tabs open, three bookmarked playlists, and zero clarity on what to actually study tomorrow morning.
The learning itself was never the hard part. The annoying part was deciding what to learn next - and then deciding again the following week when I inevitably fell off track.
That's the task I picked for this weekend's challenge: not learning faster, not watching more tutorials, but eliminating the mental overhead of figuring out what comes next. The result is LearningPath AI - an AI companion that takes my skills, my target role, and my available hours, then hands me a daily task list that adapts as I go. No more decision fatigue. No more stale bookmarks. Just open the app, see today's task, and learn



Vision & What the App Does

LearningPath AI treats your career ambition as a stream of "skill gaps" - things you need to learn, practice, or certify in, but haven't started yet. Courses you've been meaning to take. Projects you keep postponing. Certifications that would unlock the next role. Documentation you bookmarked three months ago. Individually each one takes an hour or two to complete. Collectively, across a year, they're the reason career goals stay pinned to "someday" instead of moving to "done."
The app works the moment you tell it three things: what you already know, where you want to be, and how many hours a week you can spare.
It takes your skill profile - say, "intermediate TypeScript, beginner AWS, targeting Cloud Architect, 10 hours a week" - and hands it to an AI model that decides: what should this person learn, in what order, at what pace, broken into what daily chunks? The AI produces a full roadmap: courses first, then hands-on projects, then certification prep, each sized to fit your real schedule.
Actionable items become daily learning tasks in a personal dashboard. Each morning you see exactly what to work on - no browsing, no comparing, no decision. Just start.
As you complete tasks, a second AI pass watches your pace. Falling behind by more than 20%? It regenerates the remaining path to match your actual rhythm - not the ambitious plan you made on a motivated Sunday night. Changed your target role entirely? New roadmap, old progress preserved. Updated your available hours? Tasks reschedule themselves without losing what you've already done.
The whole point is that you spend your study time studying instead of losing it to planning, replanning, and guilt about the plan you abandoned last month. You stay in control the entire time - nothing gets added to your plate without reflecting your actual goals and constraints. The AI plans; you learn.
Since everyone's starting point and target role is different, the app also offers on-demand career guidance. Ask it "what should I prioritize?" and it analyzes your specific profile against market demand, giving you recommendations that reference your skills - not generic advice from a blog post written for someone else.




How I Built It

I wanted this to be fully serverless from the start - no servers to patch, no idle compute cost, everything scaling to zero when nobody's using it.

Tech stack:

Backend: TypeScript on AWS Lambda - seven functions (Profile, Path Generator, Task Scheduler, Tracking, Adaptive Planner, Career Guidance, Path Retrieval) each handling a single domain concern, sharing common modules for DynamoDB access, retry logic, structured logging, and error handling, so prompt templates and data-access patterns live in exactly one place.
AI: Amazon Bedrock, calling Claude 3 Haiku through the InvokeModel API -fast and cheap for roadmap generation, career guidance synthesis, and adaptive replanning.
Data: Amazon DynamoDB, single-table design (PK=USER#{userId}, SK=PROFILE / PATH#{pathId} / TASK#{taskId} / MILESTONE#{milestoneId} / SCHEDULE#{date} / PATH_VERSION).
API layer: Amazon API Gateway (REST API) with seven routes, each wired to its own Lambda.
Infrastructure as code: AWS SAM template, one file, deployable end-to-end with sam build && sam deploy --guided.
Testing: Vitest with 334 tests across 14 files - unit tests for every handler and algorithm, mocked AWS services, full edge-case coverage.
Development process: Spec-driven development using Kiro IDE - requirements first, then design, then a structured task list, then execution. No code written until the architecture was settled.
My process started with the three hardest architectural decisions, before writing any code: how should the AI interact with the user's data, how does adaptation work without losing progress, and how do I keep seven Lambdas from becoming seven separate codebases.
Decision 1: One Lambda per domain, not one monolith. My first instinct was a single API handler with route matching inside it - simpler to deploy, fewer cold starts to worry about. But each service has fundamentally different resource needs: path generation and adaptive replanning call Bedrock and need 60-second timeouts; task retrieval is a pure DynamoDB read that finishes in under 100ms. Splitting them means each function gets its own timeout, memory allocation, and IAM permissions scoped to exactly what it needs. The Tracking Lambda can't accidentally invoke Bedrock. The Path Retrieval Lambda can't accidentally write to the table. Least-privilege by architecture, not by discipline.
Decision 2: Single-table DynamoDB, not one table per entity. I have six entity types (profiles, paths, tasks, milestones, schedules, path versions) that all belong to a single user and are almost always queried together. A single table with composite keys (USER#{userId} + entity-specific sort keys) means every access pattern is a single query - no cross-table joins, no fan-out reads. The tradeoff is a slightly more complex key design upfront, but the operational simplicity of one table, one capacity configuration, and one backup strategy is worth it for a project this size.
Decision 3: Optimistic concurrency for adaptive replanning, not locks. The trickiest flow is when the Adaptive Planner regenerates a learning path. While Bedrock is generating the new version (which can take several seconds), the user might be completing tasks on the old version. I solved this with version attributes on the PathVersionEntity -the planner reads the current version, does its work, then writes the new version with a condition that the stored version hasn't changed. If someone else modified it concurrently, the write fails cleanly and the user can retry. Meanwhile, the existing path stays served the entire time the new one is being generated. No downtime, no stale reads.
Decision 4: Two-prompt AI architecture, not one generic call. I deliberately split Bedrock usage into two specialized prompts. The path generation prompt is structural - it outputs a typed JSON schema with tasks, prerequisites, milestones, and time estimates. The career guidance prompt is conversational -it reasons about market demand relative to the user's specific skills and returns prioritized recommendations. Using one prompt for both would mean either over-constraining the guidance output or under-constraining the path output. Each prompt does one thing well and produces a predictable structure I can parse without guessing.
Decision 5: Topological sort for task ordering, not naive sequencing. Learning paths have prerequisites - you can't build a serverless app before you understand Lambda basics. Rather than trusting the AI to always return tasks in perfect dependency order, I run Kahn's algorithm on the task graph after generation. This guarantees that no task is ever scheduled before its prerequisites regardless of how Bedrock orders its response. It also handles edge cases cleanly: invalid prerequisites pointing to nonexistent tasks get ignored, circular dependencies get appended at the end instead of crashing.
Decision 6: Spec-driven development, not "figure it out as I go." Before writing a single line of implementation code, I wrote a requirements document (8 user stories with acceptance criteria), a design document (architecture, interfaces, data models, 16 correctness properties), and a task list (12 top-level implementation tasks). This meant that when I sat down to code, every function already had a clear contract, every edge case was already identified, and I never had to stop mid-implementation to make an architectural decision. The spec was the thinking; the code was just typing.



Challenges Encountered - and How I Overcame Them

Getting Claude to return reliable JSON, not prose. The path generation prompt needs structured JSON back - tasks with IDs, types, prerequisites, time estimates -not a friendly paragraph explaining the roadmap. Early responses sometimes wrapped the JSON in markdown code fences, added a preamble like "Here's your learning path:", or occasionally invented JSON fields I didn't ask for. I solved this with a strict system prompt defining the exact schema expected, the phrase "Respond with ONLY a valid JSON object," and a fallback parser in the shared layer that strips markdown fences and extracts the JSON body even if the model wraps it. The career guidance prompt had the same issue - both now go through the same parseBedrockResponse pattern: try to parse, strip fences if it fails, try again.
Circular prerequisites in AI-generated task graphs. The AI occasionally generates tasks with circular dependencies - Task A requires Task B, Task B requires Task C, Task C requires Task A. My initial topological sort (Kahn's algorithm) would simply drop these tasks entirely, since they'd never reach zero in-degree. The fix was adding a fallback: after the algorithm completes, any tasks still "stuck" in the graph get appended at the end in their original order. They still get scheduled - they just lose their prerequisite guarantee. Better to schedule a task in an imperfect position than to silently delete it from someone's roadmap.
The pace deviation cold-start problem. The adaptive planner triggers when your actual pace deviates from planned by more than 20%. But what happens on day one, when you've completed zero tasks in near-zero elapsed time? Division by near-zero gives absurd rates. A single task completed in the first hour looks like 168 tasks/week, triggering immediate unnecessary adaptation. I fixed this by short-circuiting: if elapsed time is under one week, skip deviation detection entirely. The algorithm needs at least a week of real data before its signal means anything.
Optimistic concurrency failures during rapid task completion. When a user rapidly marks multiple tasks as complete, the Adaptive Planner might detect a pace deviation and start regenerating the path. Meanwhile, the Tracking Lambda is still updating task statuses. If regeneration finishes and tries to write the new PathVersionEntity with expectedVersion: 2, but the tracking writes bumped it to 3, the conditional write fails. My first instinct was to add retries, but that would mean the planner re-reads, re-invokes Bedrock, and re-writes - expensive and slow. Instead, I return a clean 409 Conflict to the caller with a message to retry, and designed the frontend to handle this gracefully. The existing path stays served the whole time, so the user never sees a broken state.
DynamoDB single-table key design collisions. Early in development, I used TASK#{taskId} as a sort key without scoping it to a specific path. When the Adaptive Planner regenerates a path and writes new tasks, old tasks from the archived path were still sitting under the same partition key. Querying "all tasks for this user" returned a mix of current and archived tasks. The fix was filtering by pathId after the query - not ideal for cost, but clean, since a single user will never have thousands of archived paths. I considered adding a GSI keyed on pathId, but for the expected data volume, a post-query filter is simpler and cheaper.
Bedrock timeout under cold start conditions. The Path Generator Lambda has a 60-second timeout, but Bedrock's InvokeModel call to Claude can take 8-12 seconds for a complex roadmap, and Lambda cold starts add another 2-3 seconds. Combined with the retry logic (up to 3 retries with exponential backoff: 1s, 2s, 4s delays), a worst-case scenario of "Bedrock is slow, first two attempts timeout" could theoretically exceed 60 seconds. I addressed this by setting the Bedrock-dependent Lambdas to 60-second timeouts (vs 30 for simple DynamoDB-only Lambdas) and capping maxDelayMs at 10 seconds so retries don't stack up beyond the function's lifetime.
Testing seven Lambdas without a real AWS account. Every handler calls DynamoDB and some call Bedrock -I couldn't run 334 tests against live services on every save. I mocked the AWS SDK at the module level using Vitest's vi.mock, injecting controlled responses for every access pattern. The tricky part was the Bedrock integration: I needed to simulate both successful JSON responses and various failure modes (timeout, throttling, malformed response). I created a setBedrockClient / resetBedrockClient helper that lets tests inject a mock client, so the same production code path runs in tests without touching the network. This pattern - "injectable client with a module-level default" - ended up being the cleanest way to test any external service dependency.



AWS Services Used / Architecture Overview


Service
Role
Amazon Bedrock (Claude 3 Haiku)
Generates personalized learning roadmaps from skill profiles; synthesizes career guidance recommendations; regenerates adaptive paths when pace deviates
AWS Lambda
Seven TypeScript functions: Profile creation, Path generation, Task scheduling, Task completion tracking, Adaptive replanning, Career guidance, Path retrieval
Amazon DynamoDB
Single-table store for all entities — skill profiles, learning paths, tasks, milestones, daily schedules, and path version tracking
Amazon API Gateway (REST API)
REST surface with seven routes, each wired to its own Lambda function
AWS SAM
Defines all of the above as code in a single template.yaml, deployable end-to-end with sam build && sam deploy
On-demand generation happens when the user submits their skill profile for the first time. The Profile Lambda validates and stores the profile, then the Path Generator Lambda is called separately - it reads the profile, sends it to Bedrock with a structured prompt, receives a full roadmap (tasks, prerequisites, milestones, time estimates), runs a topological sort to guarantee dependency ordering, and writes everything to DynamoDB in a single batch. This is the heaviest operation - it touches Bedrock, runs an algorithm, and writes dozens of items - but it only happens once per roadmap.
Continuous tracking happens every time the user marks a task as complete. The Tracking Lambda updates the task status, recalculates milestone progress (simple division: completed / total × 100), checks if any milestone just crossed the finish line, and returns the result. No AI involved - this is pure DynamoDB reads and writes, finishing in under 100ms.
Adaptive replanning is triggered explicitly by the user or could be automated on a schedule. The Adaptive Planner Lambda first runs pace deviation detection - comparing actual tasks-per-week against the planned rate. If the deviation exceeds 20%, or if the user changed their target role or available hours, it sets the current path status to "regenerating" (so the old path keeps being served), invokes Bedrock for a fresh roadmap, preserves all completed tasks and reached milestones, writes the new version with optimistic concurrency, and atomically swaps the active path pointer. The user never sees a gap - the old path serves until the new one is fully written.
User-flow diagram:

Sequence diagram phase 1:

Sequence diagram phase 2:






What I Learned

Don't trust AI output structure -validate and normalize it every time. Claude is remarkably good at generating roadmaps, but "remarkably good" isn't "perfectly reliable." It sometimes wraps JSON in markdown fences, invents task types I didn't define, or creates circular prerequisites. The biggest lesson from this build was that every AI response needs a normalization layer - strip fences, default invalid types to "reading," run a topological sort to fix ordering regardless of what the model returned. Treating AI output as untrusted user input (validate, sanitize, normalize) is the pattern that made the whole system reliable.
Prompt-engineering for structure and for reasoning are genuinely different skills. Getting Claude to produce a valid JSON roadmap with tasks, prerequisites, and time estimates is a constrained, almost mechanical task -the system prompt just needs a strict schema definition and "respond with ONLY a valid JSON object." Getting Claude to write useful career guidance - recommendations that reference the user's actual skills rather than generic advice -took more iteration on context injection, and on explicitly instructing it to name specific skills from the profile rather than inventing vague summaries like "improve your cloud knowledge."
Spec-driven development surfaces design problems before they become code problems. Writing requirements, then a design document with 16 correctness properties, then a structured task list - all before touching implementation code - felt slow at first. But it caught real issues early: I discovered the optimistic concurrency need during design (not during a production race condition), identified the topological sort requirement by reasoning about prerequisites (not by debugging a broken schedule), and mapped every error response before writing a single handler. The spec was three hours of thinking that saved twenty hours of debugging.
Optimistic concurrency is simpler than locks, but you have to design for the conflict path. Using version attributes on PathVersionEntity is elegant for the happy path - read version, do work, write with condition. But the first time I tested rapid task completions during adaptive replanning, writes started failing with ConditionalCheckFailedException. The real lesson wasn't "add retries" -it was "design a graceful conflict response (409) and ensure the user never sees a broken state." The old path keeps serving during regeneration, so a conflict just means "try again," not "your data is gone."
Single-table DynamoDB forces you to think about access patterns upfront, and that's the point. I couldn't just create a table per entity and figure out joins later. Having to design all six entity types, their key structures, and their query patterns before writing any data access code meant that by the time I wrote the DynamoDB module, every access pattern was already mapped. The upfront cost was real - an hour sketching key schemas -but the result was a single module with zero cross-table complexity and one backup strategy for the entire app.
334 tests with mocked AWS services run in under a second, and that changes how you work. Mocking DynamoDB and Bedrock at the module boundary (not with localstack, not with integration tests against real services) meant the full test suite runs in 994ms. That's fast enough to run on every save. I caught the circular-dependency edge case, the pace-deviation cold-start bug, and three different off-by-one errors in the scheduler - all within seconds of introducing them. Fast tests aren't a luxury; they're the reason the code works.
Splitting Lambdas by domain concern pays off in ways you don't expect initially. The obvious benefit is independent scaling and deployment. The non-obvious benefit is that IAM permissions become trivially correct: the Tracking Lambda literally cannot call Bedrock because it doesn't have the policy. The Path Retrieval Lambda cannot write to the table because it only has read access. Security by architecture eliminates an entire class of "oops, the wrong function accidentally did the wrong thing" bugs that no amount of code review would reliably catch.



The Result

I ran the full loop end to end: I entered a real skill profile - TypeScript at intermediate, AWS at beginner, targeting Cloud Architect, 10 hours a week - and watched Claude generate a complete roadmap in about eight seconds. Not a generic list of "learn cloud computing" bullet points, but a structured path: an AWS fundamentals course first, then a hands-on Lambda project that depended on finishing the course, then certification prep that depended on both, each one sized with realistic time estimates that actually respected my 10-hour constraint. The topological sort placed them in the only order that made sense, and the scheduler distributed them across days without me touching anything.
Then I started marking tasks complete. The progress bar moved. A milestone unlocked - "AWS Basics Complete" - and the response told me exactly which tasks had counted toward it. I deliberately slowed my pace for a few days, then triggered the adaptive planner. It detected the deviation (I was at 35% behind planned rate), called Bedrock again, and came back with a recalibrated path - fewer tasks per week, stretched over more time, but with my completed work still there, untouched, milestones still reached. It didn't throw away my progress to give me a "fresh start." It adjusted around what I'd already done.
What struck me wasn't that an AI could generate a to-do list - plenty of things do that. It was that the two distinct AI interactions felt purposefully different from each other, the way I'd designed them to: path generation felt structural and mechanical (give it a profile, get back a dependency graph), while career guidance felt genuinely analytical - it referenced my specific skills by name, told me TypeScript was higher priority than AWS for my target role because senior frontend positions weight it more heavily, and suggested related roles I hadn't considered. Watching that difference show up in actual output, not just in my head as a design intention, was the moment this stopped feeling like a demo and started feeling like something I'd genuinely use.
The deeper thing I was testing with this build wasn't really "can AI suggest what to learn" - course recommendation engines have existed forever. It was whether an AI could understand the dependencies between skills well enough to produce an order that actually makes sense, and then adapt that order when reality doesn't match the plan - without me replanning from scratch. After a week of actually using it, I stopped opening YouTube to browse courses. I just opened the app, saw today's task, and started learning.





Link to App or Repo




Final Thoughts

he most useful thing I learned building this isn't really about AWS at all — it's that a genuinely annoying task usually isn't hard to do, it's hard to decide. The hard part of this build wasn't wiring Bedrock into a Lambda function; it was deciding how much to let the AI decide for you (all of the planning, ordering, and scheduling) versus how much to keep with the human (the actual learning, the pace, the career direction). That balance — confidently handling the tedious planning part, while never overriding what you've already accomplished or where you actually want to go — is what turned this from "another course recommendation engine" into something that actually gives me my Sunday evenings back.
The annoying task was never "learning." It was the twenty minutes before learning — the browsing, the comparing, the second-guessing, the guilt about yesterday's abandoned plan. LearningPath AI doesn't make you smarter or faster. It just removes the one friction point that kept making you not start. And it turns out that's the only friction that ever mattered.
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