Shift swap broker
A small system that takes a request to give up a shift, works out who is genuinely eligible to take it — qualified, available, and not heading into overtime — offers it to them, and puts one clean swap in front of a manager to approve. It never changes a rota on its own. Seven posts on the same system — one diagram at a time — with a cost breakdown and an engineering reference at the end.
- 01
A shift swap broker on AWS for a few dollars a month
The whole system on one page — an eligibility check, an offer loop and an approval — built so a manager sees one clean swap rather than a negotiation.
- 02
How a shift gets offered up
Two taps to give up a shift, why the reason is optional, and the cut-off that separates a swap request from an absence.
- 03
How eligibility is computed
What each of the four eligibility checks actually reads, and why the ordering of the surviving list matters more than the filtering does.
- 04
How the offer loop works
Why offers go out in small batches rather than to everybody or one at a time, how the time limit shrinks as the shift approaches, and what happens when the list runs out.
- 05
How an approval writes the rota
What one approval actually changes, why an override is allowed and recorded, and the monthly report that says whether the swap rules still fit the business.
- 06
What the shift swap broker costs
About $2 a month. One Bedrock read per swap is the only line that grows; the queue, the table, the mail and the storage are rounding errors. Plus the three ways the bill could surprise you.
- 07
Engineering reference: the shift swap broker architecture
Same system, drawn purely for engineers. Service names, region, Lambda inventory, IAM scopes, the schemas and the exact model id.
Frequently asked questions
- What is a shift swap broker?
- A small serverless system that handles the swap request itself: somebody offers up a shift, it works out who is eligible to take it, offers it to them in a sensible order, and sends one approval request to a manager. The rota is only changed by the manager approving.
- Why not just use the group chat?
- Because the group chat cannot check anything. It does not know who is qualified for that station, who is already on that day, who would go into overtime, or who has had four swaps this month. All of that gets discovered after the swap is agreed, which is when it becomes a manager’s problem.
- Does it change the rota automatically?
- No. It produces one approved-or-not decision for a manager, with the eligibility already checked. Approval writes the swap; nothing else does.
- What stops one person doing all the swaps?
- A per-person cap in the rules sheet, counted over a rolling window. Somebody who has already taken four extra shifts this month stops being offered them, which protects both the business and them.
- What does it cost to run?
- A couple of dollars a month even for a business running a few hundred shifts. See part six.