AWS Builder Center
Finding One Free Hour: Building Slate on AWS in Four Days

Finding One Free Hour: Building Slate on AWS in Four Days

A cancelled lecture at IIIT Allahabad needs a new hour that three sections and one professor can all make. We built the thing that answers it — on Amplify Gen 2, Lambda, DynamoDB and Cedar — and Amazon Bedrock handed us a daily quota of zero on day one.

There is a specific, boring, recurring failure at my college, and it looks like this.
A professor cancels Thursday's lecture. They tell the class representative — not the department, not a system, the CR — and the CR posts it in a WhatsApp group of 108 people. Half of them have the group muted. Then comes the harder half: the makeup class has to fit three sections, each of which has a different professor for the same course, and the professor themself has classes in two other batches. So someone posts a poll. Someone replies "B has DTI lab Tuesday." Someone else replies twelve hours later. Two days go by, and the answer was sitting in four spreadsheets the whole time.
That is the entire idea behind Slate, which we built for  First Commit  (WeMakeDevs × AWS) between September 18 and September 20, 2026. Ninety-eight commits across three days, on the Ship It track, live at a public URL from day one.
This post is about what we actually built, and — more usefully — about the three things that went wrong: a foundation-model quota of zero, a spreadsheet cell that lies about how long a class is, and a product that had to be rebuilt twice because our model of "who attends a class" was wrong both times.



The question you have to answer before you write any code

Every project at a hackathon in 2026 gets the same question from a judge: why isn't this just a prompt?
For most scheduling ideas, it is. "Suggest a good time for a meeting" is a language problem. But this one has a clean answer, and the answer is the reason we picked it:
No chatbot has the data, and the data is the whole problem.
To propose one hour for a makeup Image and Video Processing class, you need, simultaneously: the effective timetable of every section registered in that offering, the professor's classes in every other batch they teach, that week's cancellations and previously-added extra classes, the elective baskets the batch might be sitting in, which half of a split lab (B1 or B2) each student belongs to, and which rooms are free in that exact interval.
That is not a reasoning problem. It is interval intersection over data nobody has ever cross-referenced, because it lives in one spreadsheet per department. The product is getting the data into one place; the algorithm is twenty lines of comparison at the end.
Which is convenient, because it means the hard part is AWS-shaped rather than model-shaped.



Day one: a public URL before a product

The one non-negotiable rule we gave ourselves was that a live URL would exist before any feature did. On the Ship It track there is no live demo and no Q&A — judges score a repository and a three-minute video. A project that "works locally" is a project that does not exist.
So the first two commits, at 00:45 and 01:36 on September 18, were the Amplify Gen 2 scaffold and Cognito.
Amplify Gen 2 is the reason a team that started the week new to AWS could ship this. You describe the backend in TypeScript and it provisions the real services — Cognito user pool, AppSync API, DynamoDB tables, Lambda functions, S3 bucket, IAM roles between them. There is no console clicking to reproduce and no hand-written CloudFormation to debug.
The closed-community boundary is a Cognito pre-sign-up trigger — a Lambda that runs before Cognito will create an account at all:
// amplify/auth/pre-sign-up/handler.ts
const ALLOWED_DOMAIN = 'iiita.ac.in'

export const handler: PreSignUpTriggerHandler = async (event) => {
const email = event.request.userAttributes.email ?? ''
const domain = email.split('@')[1]?.toLowerCase()

if (domain !== ALLOWED_DOMAIN) {
throw new Error(`Sign-up is restricted to @${ALLOWED_DOMAIN} email addresses.`)
}
return event
}

One comparison, and it does a lot of work: because every account is a verified institute address, a roll number is an identity, not a claim.  iit2024245@iiita.ac.in  is student IIT2024245 of B.Tech IT Sem 5, Section C. We never ask a student which section they're in; we look it up. Anything a user could type, a user could lie about.
One thing we got right early and would recommend to anyone using Amplify: admin rights come from a Cognito group, not from a field on the user's own row.
export const auth = defineAuth({
loginWith: { email: true },
// Admin rights come from this group, not the User.role field: users can
// edit their own User row, but only the AWS account can add group members.
groups: ['ADMIN'],
triggers: { preSignUp },
})

A  role: 'ADMIN'  string in DynamoDB is an authorization bug waiting for someone to open the network tab. Group membership is issued inside the token by Cognito and cannot be written by the client at all.



The plan that died before lunch: Bedrock's daily quota was zero

Our written architecture said this, in the repository, before the event started:
Admin uploads the official timetable PDF → S3 → Amazon Textract extracts tables → Amazon Bedrock normalizes the messy output into our schema → DynamoDB.
It is a good plan. It is also the plan every judge wants to see, because it is the one with AI in it. We had  scripts/bedrock-normalize-timetable.py  written and ready, with a very carefully engineered system prompt about merge ranges and cohort labels.
Then we opened the Bedrock console on a fresh AWS account and found that every model's daily token quota was 0. Not "access not requested" — granted, and quota zero. That number is not raisable from the console. The only route is a support case, and a support case does not resolve inside a four-day event.
We had two options.
The dishonest one: run Bedrock once on a tiny sample, screenshot it, describe the architecture in the present tense, and hope nobody checks. Plenty of hackathon projects are shaped exactly like that.
The one we took: delete Bedrock from the live path, write a deterministic parser instead, and say so out loud in the README. The Python script stays in the repo, clearly marked as not wired in.
That decision turned out to be the best thing that happened to the project, for a reason I did not expect. A model normalizing a timetable gives you an answer with no notion of whether it is right. What we built instead can check its own work — and that section is the most interesting code we wrote all weekend.



The merged cell that lies: validating a parser against the syllabus

Here is the actual problem with institutional timetables. This is a real cell from the IT Semester 5 sheet:
IML (L) - Sec B (CC3-5207)

Fine. Course IML, a lecture, Section B, room CC3-5207. Now: that cell is merged across columns K and L. Does that mean the class runs 11:00–13:00, two hours? Or does it mean the header row itself splits one hour across two cosmetic columns and the class is 11:00–12:00?
Both happen. In the same workbook. The 3rd-semester sheet merges  E:F  for a single 11–12 hour; the 5th-semester sheet merges  K:L  for a real two-hour block. There is no local signal in the cell that tells you which.
But there is a global one. Every one of these sheets prints a course legend underneath the grid, and every legend row carries an L-T-P-S figure — lecture, tutorial, practical and self-study hours per week, straight out of the curriculum. If IML is  3-0-2-0 , then Section B must end up with exactly 3 lecture/tutorial hours and 2 practical hours in the week. So:
Read every ambiguous merge the short way first. Compute each section's weekly hours per course. Compare against the legend. Now extend an ambiguous merge to its long reading only if every section it covers is still short by at least that much.
It is a small constraint-satisfaction pass, and it fits in about thirty lines:
// Ambiguous merges: take the long reading only where every section it
// covers is short of its legend hours by at least that much.
for (const r of rows) {
if (r.duration !== 'ambiguous') continue
const extra = (minutes(r.longEndTime!) - minutes(r.endTime)) / 60
const kind = r.sessionType === 'P' ? 'P' : 'LT'
const keys = groups.filter((g) => applies(r.section, g))
.map((g) => `${r.courseId}|${g}|${kind}`)

if (keys.length && keys.every((k) => deficit.get(k)! >= extra)) {
r.endTime = r.longEndTime! // it's a real 2-hour class
r.duration = 'ambiguous->long (matches L-T-P-S)'
keys.forEach((k) => deficit.set(k, deficit.get(k)! - extra))
} else if (keys.length && keys.every((k) => deficit.has(k))) {
r.duration = 'ambiguous->short (matches L-T-P-S)' // cosmetic merge
} else {
r.duration = 'ambiguous->short (UNVERIFIED, no L-T-P-S)'
issues.push({ type: 'unverified-duration', row: short(r) }) // tell the admin
}
}

The same arithmetic then pays for itself twice more. Leftover deficits become  hours-mismatch  issues, and those turn out to catch errors in the official sheets themselves — a lab typed as  SS (T)  instead of  SS (P)  shows up immediately as two hours missing from practicals and two too many in lectures. Overlap checks on the same pass produce  room-clash  and  section-clash  issues.
Nothing that fails a check is guessed. It is listed for the admin, who sees every proposed row — new, changed and unchanged — before a single item is written to DynamoDB. The import Lambda runs twice: once as  dryRun: true  to produce the diff, once for real after the human says yes.
And the fallback is a flat eight-column Slate template ( Day, Start, End, Course, Type, Section, Room, Faculty ). Any sheet the grid reader cannot handle gets copied into that and imports exactly. A parser that is honest about its limits plus a boring escape hatch beats a clever parser that silently drops 3% of classes.

The 49

Before we had the L-T-P-S check, the first version of the extraction only inspected merge state on cells that already looked unusual. Every regular per-section class merged across real hour columns silently lost its extra hour.
A full audit across both semester sheets found 49 under-reported class durations. We cross-checked one of them against a teammate's own photographed timetable — IVP running 09:00–11:00 on Friday — before touching anything, to make sure the pattern was real and not 49 false positives. Then we applied all 49 as  endTime -only updates. No rows added, no rows lost.
That commit,  c5daff8 , is the single most valuable thing in our git history, and it exists because we were forced to build something we could audit.



The slot finder is deliberately boring

The  find-slots  Lambda is the feature. It is also almost aggressively unintelligent, and that is the point: every answer it gives has to be explainable to a professor who is being told they cannot have 11 a.m.
For each candidate date it builds everyone's effective timetable — weekly meetings on that weekday, minus that date's cancellations, plus that date's extra classes — intersects the free intervals, filters by the requested window and length, ranks what survives, and attaches a free room.
Two details make it more than a  for  loop.
Everyone who must be free is a student, not a section. Once we had real registration data (more on that below), the finder stopped reasoning about sections entirely. It gathers the students actually registered in the offering and unions their other meetings. A drop-year student taking IML with this year's Section C is not a special case; they are just a student with a set of meetings. That deletes an entire category of bug.
The obvious problem is that this is ~108 timetables per query. The fix is a one-line insight: students in the same section have identical timetables, so group them by signature and check each distinct timetable once.
// Students with identical timetables are one check, not sixty.
const profiles = new Map<string, { students: string[]; busy: Busy[] }>()
for (const rollId of attendees) {
const keys = keysOf(rollId) // their offerings
const sig = [...keys].sort().join(',') + `|${groupOf.get(rollId) ?? ''}`
if (!profiles.has(sig))
profiles.set(sig, { students: [], busy: busyOf(keys, groupOf.get(rollId)) })
profiles.get(sig)!.students.push(rollId)
}

A hundred students collapse to two or three profiles — one per section, plus one for each genuinely irregular enrolment. Correctness of per-student data, cost of per-section data.
When nothing fits, say who is blocking. A scheduler that returns an empty list is useless; the CR still has to find out why. So when the ranked list is empty, we ask which single party blocks the most candidate slots, and what they are doing instead:
const worst = parties
.map((p) => ({ p, blocked: cands.filter((c) => clash(p.busy, c)) }))
.sort((x, y) => y.blocked.length - x.blocked.length)[0]

which produces, in the UI:
12 of the registered students can't make 7 of the 9 slots — e.g. Tue 23 Sep 09:00–11:00, when they have DTI.
The professor is in that same list of parties, so the blocker can equally come back as "Dr. Shiv Ram Dubey is teaching CS301 to ECE then." That single sentence is the difference between a tool and a toy, and it is about eight lines of code.
Ranking is three explainable rules, not a score anyone has to trust: inside 09:00–17:30, avoids the 12:00–14:30 lunch window, and every result carries its reason string —  free for all 108 registered student(s) · Dr. Shiv Ram Dubey is free · within 9–5:30 · avoids the lunch hours .



Authorization you can read: Cedar inside a Lambda

The rule that actually matters in this product is not a rule about lectures. It is:
A class representative may change the timetable of the course their section takes, in their own batch, and nothing else. Ever.
We could have written that as an  if . We wrote it as a policy file instead, using Cedar — the open-source policy language behind Amazon Verified Permissions — evaluated by  @cedar-policy/cedar-wasm  inside our  section-changes  Lambda. The whole authorization model of the application is 48 lines you can read in one sitting:
// Claim: your own section, and only while it has no CR.
permit (principal, action == Slate::Action::"ClaimCr", resource is Slate::Section)
when { principal.section == resource.key && !resource.hasCr };

// Cancel / add / move a class of an offering: a CR of a section it's taught to.
permit (
principal,
action in [Slate::Action::"Cancel", Slate::Action::"AddExtra", Slate::Action::"Move"],
resource is Slate::Offering
)
when { resource.crs.contains(principal) };

// Undo a change for one section only: that section's CR.
permit (principal, action == Slate::Action::"UndoSection", resource is Slate::Section)
when { resource.hasCr && resource.cr == principal };

// Admins can do all of it.
permit (principal, action, resource) when { principal.role == "ADMIN" };

The load-bearing part is not Cedar itself, it is this comment above the policy:
// principal.section is resolved by the server from the student's verified
// email (roll number), and resource.crs from the timetable and the CR list;
// nothing here comes from the request itself.

Every AppSync mutation that changes a timetable is open to any signed-in user on purpose. The API layer does not decide anything. The Lambda derives the caller's section from their Cognito-verified email, derives the affected sections from  TimetableSlot , builds the Cedar entities from those, and asks the policy. A client that sends its own section list gets that list thrown away.
Two implementation notes worth stealing.
Access tokens carry no email. The app authenticates with Cognito access tokens, which have a  sub  and groups but no email claim. We could have read the email from our own  User  table — except users can edit their own  User  row, which would make the whole authorization chain client-controlled. Instead the Lambda calls  AdminGetUser  against the user pool, keyed on the token-verified username, and only trusts the address if  email_verified  is true:
const user = await cognito.send(new AdminGetUserCommand({
UserPoolId: process.env.USER_POOL_ID!, Username: username,
}))
emails.set(username, attr('email_verified') === 'true' ? attr('email') ?? '' : '')

Cached per warm container, and granted with exactly one IAM statement in  backend.ts :
backend.auth.resources.userPool.grant(changesFn, 'cognito-idp:AdminGetUser')

The Lambda bundler can't load  .wasm  or  .cedar  files. Amplify bundles function code with esbuild, which happily ignores both. The fix is to generate a TypeScript module at synth time, before bundling, containing the policy text and the Cedar engine as base64:
// amplify/functions/section-changes/resource.ts — runs at synth, not at runtime
writeFileSync(here('./embedded.gen.ts'),
`export const POLICY = ${JSON.stringify(readFileSync(here('./policy.cedar'), 'utf8'))}\n` +
`export const CEDAR_WASM_BASE64 = '${readFileSync(wasm).toString('base64')}'\n`)

It produces a 5.8 MB generated file that is gitignored and never edited by a human, and the handler boots the engine with  initSync({ module: Buffer.from(CEDAR_WASM_BASE64, 'base64') }) . Slightly grubby; entirely reliable.
Finally, every decision is logged, both directions:
console.log(JSON.stringify({
cedar: decision, action, email: ctx.email,
principal: ctx.principal.attrs, resource: resource.uid.id,
}))

Which means CloudWatch Logs holds a structured audit trail of every allow and every deny, and  aws logs tail /aws/lambda/<section-changes-log-group> --since 30m | grep cedar  is a thing you can run on camera. A UI that hides a button proves nothing. A  "cedar":"deny"  line with a timestamp proves the server refused.



Two pivots that deleted more code than they added

We rebuilt the core model of the product twice in four days. Both times, the new version was smaller.

Pivot one: professors don't log in

Slate started as a faculty tool — a professor schedules a makeup class, students see it. It is the obvious design. It is also not how anything at my college actually happens.
The professor tells the CR. The CR tells everyone. That's the real protocol, it already works, and it has one failure mode: WhatsApp. So on day three we cut faculty logins entirely and made the product student-run, one CR per section, claimed first-come and revocable by an admin. Professors never sign in; their ingested schedule feeds the slot finder so the finder knows when they're free.
This is the change I'd defend hardest. We didn't build a better process. We gave the existing one a server.

Pivot two: a section is not a timetable

The deeper rebuild came on the last morning. Our model said a student attends their section's classes, with per-student ADD/DROP exceptions bolted on for drop-year students and electives.
Then we opened the institute's own mid-semester examinee list: 16,483 rows, one per student per course, shaped like this:
PROG-SEM ENROLL STUDENTNAME COURSENAME FACULTYNAME
B.Tech (ECE) Sem-1 IEC2026001 ASMITA MITRA Engineering Physics PROF. AKHILESH TIWARI

That is a registration list. Combined with the timetable — when and where each professor teaches each course — it answers "what is this student's week?" exactly, with no defaults and no exception table. So we restructured around three entities:
Entity
What it is
Course
What a course is, independent of who teaches it. Code, name, kind, L-T-P-S.
Offering
One course as actually taught: one professor, one audience. IML in IT Sem 5 is three offerings, because Sections A, B and C each have a different professor. This is the unit a student registers for and the unit a timetable cell belongs to.
ClassMeeting
One weekly slot of an offering. Day, times, room, session type, and a group for a split lab.
Everything got simpler at once. A cancelled class is a change on an offering, so it reaches exactly the students registered in it — no section arithmetic. An elective is an offering with  sections: ['*'] , attended only by the registered. A drop-year student is a registration in another batch's offering. Lab splits are a  group  field. The "irregular attendee" concept we had carefully designed vanished, along with the code that implemented it.
The one genuinely fiddly part was matching 16,483 registration rows to offerings, because the registry writes course names and the timetable prints codes, and nobody spells a professor's name the same way twice. We match on professor first, course name second:
/** "PROF. ANUPAM" and "Prof. Anupam Agarwal" are one person: every word of
* the shorter name appears in the longer one. */
export function sameFaculty(a: string, b: string): boolean {
const [short, long] = ...
// Timetables shorten and mistype names ("Dr. Nikhiland" for Dr. Nikhilanand
// Arya), so a word counts as matched when it prefixes one of the other's,
// or when both are long and share a seven-letter stem.
const like = (v, w) => v === w || v.startsWith(w) || w.startsWith(v)
|| (v.length >= 7 && w.length >= 7 && v.slice(0, 7) === w.slice(0, 7))
return short.every((w) => long.some((v) => like(v, w)))
}

Anything ambiguous returns a reason, not a guess —  "IML: several offerings match and the professor didn't narrow it"  — and lands in the admin's review list. Same principle as the parser: when in doubt, surface it, never invent it.



The architecture, and what it costs

The image related to the architecture will be posted along side
My favourite piece of infrastructure in the whole project is four lines in  backend.ts :
// Changes only matter for this week and next: each row carries expiresAt
// (epoch seconds, the Monday after its week) and DynamoDB's time-to-live
// deletes it after that, at no cost.
backend.data.resources.cfnResources.amplifyDynamoDbTables['ScheduleChange']
.timeToLiveAttribute = { attributeName: 'expiresAt', enabled: true }

A student should see this week and next week, and nothing older. That's a product decision. DynamoDB TTL makes it a storage decision too — the rows delete themselves, free, and the "no old history" guarantee is enforced by the database rather than by a query we might forget to write. Using a storage feature to enforce a product rule felt like the first time the infrastructure and the design agreed with each other.
Cost guardrails, deliberate from the first commit: no EC2, no NAT Gateway, no RDS, no OpenSearch, no ECS, no vector store — there is no similarity problem here, just structured data and interval math. Everything scales to zero. Across four days of development, deployments, imports and testing, Slate's own AWS usage stayed under one US cent.
What I'd fix first. Every Lambda read is currently a full table  ScanCommand  with pagination. At three thousand students that is fine and it was the right call under time pressure, but it is wrong. The access patterns all have natural keys —  PK OFFERING#<key> / SK STUDENT#<rollId>  for an offering's students,  PK STUDENT#<rollId> / SK REG#<term>#<offering>  for my registrations — and Amplify Gen 2 exposes these as  .secondaryIndexes() , so it's schema work rather than infrastructure work. It's documented in  docs/DATA-MODEL.md  as known debt, not discovered later by a bill.



Ninety-eight commits

commits by hour of day, 18–20 Sept 2026

00 ██████████ 10
01 ██████ 6
02 ██ 2
10 ███ 3
11 ████████ 8
12 ██████████████ 14
13 ██ 2
14 ████████ 8
15 ██████ 6
16 ██████████████████████ 22
17 ███████ 7
18 ████ 4
19 ██ 2
23 ████ 4
98 total · 42 / 22 / 34 per day

Roughly 3,000 lines of backend and 5,300 of frontend, written from a 200-line specification we froze before the event and amended twice, in writing, when reality disagreed with it. Both amendments are in the repo as dated documents. That turned out to matter more than any single technical decision: when three people and several AI sessions are working in parallel for four days, the spec is the only thing keeping everyone building the same product.



What four days actually taught us

Check your foundation-model quotas before you architect around them. Model access being granted and model quota being non-zero are two different things, and the second one is invisible until you look. If a hackathon plan depends on Bedrock, verify a real  InvokeModel  call on day one — not the console, an actual call. Ours would have failed at hour one instead of hour eight.
A parser that can check its own work beats a smarter parser. The L-T-P-S deficit pass is the most valuable thirty lines in the repository, and it only exists because Bedrock was unavailable. It doesn't just resolve ambiguity; it finds mistakes in the source documents. If your input format has any redundancy — a total, a credit count, a checksum — spend your time there rather than on extraction cleverness.
Put the rule in a file. Cedar took an afternoon and gave us something no  if  statement does: an authorization model a stranger can read in full, a server that refuses rather than a UI that hides, and a CloudWatch line per decision. On a project where the entire trust model is "a CR can change their own batch and nothing else," that file is the product's safety.
Model the data the institution already has, not the one you find intuitive. "A student attends their section's classes" is intuitive and wrong. The registry's own examine list said a student attends the offerings they're registered in — and once we matched that, the special cases we'd been carefully building (drop-year students, electives, lab splits, shared courses) all stopped existing. Our cleverest code was code we deleted.
Ship the existing protocol. The strongest product decision we made was removing a feature: professors never log in. The CR already tells everyone; they just do it over WhatsApp. We gave that a server, an audit trail, and one hour of interval math — and left the human process exactly where it was.


Slate — live at  main.dosqfo1xoqa7l.amplifyapp.com  (sign-in limited to  @iiita.ac.in ), source at  github.com/kavyan256/slate , MIT licensed. Built by Kavyan, Jalendu and Degama for First Commit, WeMakeDevs × AWS, September 2026.
Everything we used that we didn't write during the event — the Vite and create-amplify starters,  @cedar-policy/cedar-wasm ,  exceljs , every npm package, the fonts, and the AI coding tools (Claude Code, on Claude Sonnet 5 and Claude Opus 5) — is listed in   CREDITS.md  , as the event rules require. The timetable data is the real IIIT Allahabad sheets for July–December 2026, used as published; nothing in the demo is fabricated, and the parts that were hand-verified rather than automated are named as such in the README.
The demo credentials are uploaded in the Repo.
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