AWS Builder Center
Weekend Agent Challenge: Unlapse

Weekend Agent Challenge: Unlapse

Send Unlapse any document, insurance PDF, trial email, receipt, warranty card, and it extracts every renewal date, trial deadline, and cancellation window hiding in it. It watches those dates on its own and pings you before anything lapses, no app to open, no reminder to set yourself.

Platform Engineer · AWS Builder Circle Lead, AWS UG Madurai · Shipping agentic apps on Bedrock

Introduction

Somewhere in your inbox right now is a free trial about to become a real charge, an insurance policy renewing in nine days, or a warranty you forgot you had. You are not going to remember it until the money is already gone. That is not a willpower problem. It is a monitoring problem, and nobody is actually monitoring it. Seventy percent of people have forgotten to cancel a free trial. The average person underestimates their own subscription spend by two and a half times. Every one of these problems has the same shape: a date buried in a document, and a human brain as the only system watching it.
Unlapse watches instead.

Vision & What the Agent Does

Unlapse is an ambient agent you feed documents to, over Telegram or email, and it takes over from there. Forward it a StreamFlix trial confirmation email, and within seconds it replies with a card: StreamFlix, INR 799, Trial Conversion on 2026-07-25, with the exact sentence from your email quoted back as evidence for that date. No hallucinated numbers: every claim is pinned to text that actually exists in the document you sent.
The bot's own profile, before you have even said hello.

Every claim is pinned to a verbatim quote from the document itself, not a guess.

Tap Track, and the document is out of your head. Unlapse schedules its own reminder on Amazon EventBridge Scheduler, no cron job you maintain, no calendar entry you have to make. Nine days later, with zero human action involved, that schedule fires on its own, and a message arrives: here is what happens if you do nothing, plus a drafted cancellation email ready to send with one tap. Approve it, and it is handled. Snooze it, and it asks again in three days. A daily patrol runs every morning as a second safety net, sweeping for anything due soon that has not been acted on. Say  /forget  at any point and every record Unlapse holds about you is deleted.
One tap, and it is now Unlapse's problem, not yours.

Email works the same way: bind an address once, then forward anything to your Unlapse address and it lands in the identical pipeline.
The same pipeline, a second way in: forward mail instead of Telegram.

Same structured, evidenced output, whichever door it came through.

Ignore, and it is gone. /forget, and everything is gone.

Nobody opened the app for this to happen. EventBridge Scheduler fired it on its own clock, no human action in between.

Every time you Approve a tracked commitment before it renews, Unlapse adds the amount to a running savings total and tells you the new number right there in the confirmation: "You've saved INR 999 in total by staying ahead of 1 renewal." It only counts on Approve, never on Ignore, since ignoring something is not the same as having avoided being charged for it. The number only ever goes up.
One tap, and the savings counter that only ever goes up.

The part that matters for this challenge: sending a document in is input, not the trigger. The actual unattended work, extraction kicking off when Bedrock Data Automation finishes a job, the reminder firing days later, the daily patrol running every morning, all of it happens on EventBridge rules and EventBridge Scheduler with no button click anywhere in that path.

How You Built It

  • Stack: API Gateway, Lambda, SQS, EventBridge (rules and Scheduler), S3, DynamoDB, Bedrock Data Automation, Bedrock Nova 2 Lite with Guardrails, the Strands Agents SDK, SES, all wired together with CDK in Python.
  • Development process: I built this in layers. First the Telegram webhook spine, a thin Lambda that validates a secret token and enqueues to SQS in under 100ms. Then document ingestion into S3 and Bedrock Data Automation for async extraction. Then the agent layer, a Strands agent on Nova 2 Lite that turns raw extracted text into structured, evidenced commitments. Then the scheduling layer, EventBridge Scheduler creating one-time reminders at runtime. Then security hardening, a Bedrock Guardrail plus live adversarial prompt-injection tests.
  • The hardest bug: Bedrock Data Automation kept failing with a bare "Access Denied" writing its own output to my S3 bucket, no matter what bucket policy or KMS grant I tried for a "bedrock.amazonaws.com" principal. The actual answer, confirmed by running  aws iam simulate-principal-policy  against my own Lambda's role rather than guessing further: Bedrock Data Automation uses Forward Access Sessions. It does not act as its own service principal at all, it acts AS the calling Lambda's own IAM identity. The fix was a one-line  grant_read_write  on my own Lambda's role, not a bucket policy for Bedrock at all. That single discovery unblocked the entire pipeline.
  • A second real challenge: proving the security model actually held, not just assuming it did. I wrote documents specifically engineered to hijack the agent, one pretending to be a "system override" demanding the bot list every user's data, one asking the model to draft a suggested action containing a password. Running those live against the deployed Guardrail caught a real bug: a Guardrail block was raising an uncaught exception that silently crashed the handler with no message ever reaching the user. Fixed and redeployed, with the fix proven by the same test that found it.
  • One more deliberate gate: a new Telegram user cannot submit a single document until they tap a one-time "I'm human, let's go" button. It looks like onboarding friction, but it is really an anti-abuse control. Document submission triggers real Bedrock and Bedrock Data Automation calls, so an unverified account cannot trigger even one, which is what actually keeps a scripted bot-attack from running up a bill. Once verified, an account gets a ten-document daily quota, enforced with a conditional DynamoDB write before any Bedrock call fires, so cost stays bounded no matter what happens after that.

AWS Services Used / Architecture Overview

The full request path, from a document landing in Telegram or email to Unlapse pinging you back. Event-driven and serverless at every stage, no polling, no servers to manage.

For the deeper technical dive:
Underneath the high-level view: all five entry-point flows (webhook, email, worker, async completion, scheduler), the actual DynamoDB single-table schema, and the shared security and observability components tying it together.

Service
Purpose
Bedrock Data Automation
Async document extraction (PDFs, photos) into clean text
Bedrock Nova 2 Lite + Guardrails
Structured commitment extraction, prompt-injection and PII defense
Lambda
Webhook handling and the three-entry-point worker (ingest, BDA completion, scheduled jobs)
EventBridge (rules + Scheduler)
BDA completion trigger and every unattended reminder/patrol
DynamoDB
Single-table state: profiles, documents, commitments, savings tracked
S3
Inbound documents and BDA output
SES
Inbound email as a second ingestion channel
SQS, API Gateway, Secrets Manager, KMS, CDK
Queueing, webhook entry, secrets, encryption, infrastructure as code
AWS Budgets
A cost tripwire, sized to what this actually costs to run, not a guess
Cost stays inside AWS Free Tier plus a few cents of Bedrock and Data Automation usage per document. Estimated steady-state cost is under three dollars a month for personal use.

What You Learned

  • Bedrock Data Automation's IAM model is not what the docs summary implies. Forward Access Sessions mean the calling Lambda's own role needs the S3 permissions, not a service principal grant. Verifying with  iam simulate-principal-policy  beat guessing every time.
  • Structured output plus a hard evidence requirement is a genuinely effective anti-hallucination pattern. Forcing every extracted commitment to carry a verbatim quote from the source document, checkable in code, not just requested in the prompt, turned "trust me" into something a Lambda function can actually verify.
  • A Guardrail is worth testing adversarially, not just enabling. It caught a real defense working exactly as intended, and in the process exposed a real crash bug in my own error handling that would have shipped otherwise.
  • EventBridge's best-effort completion notifications need their own correlation strategy. They carry only a job ID and an S3 location, never an application identifier, so I made the output path itself the correlation key, no extra index needed.

Link to App or Repo

Live: message  @UnlapseAgentBot  on Telegram. Source:  github.com/yogeshselvarajan/unlapse 
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