video.dliu.com hosts videos that anyone can watch and that other dliu.com sites can embed. There are no servers: files sit in S3, CloudFront delivers them, and one small Lambda function runs only when the owner signs in or changes a video.
Running costs
Everything is billed per use. With nobody watching, the only charge is storing the videos in S3.
Security
Anyone can watch; only the owner, signed in with Microsoft, can upload, edit or delete.
Every 15 minutes, status.dliu.com visits this site from three places around the world (and every hour from mainland China), like an ordinary visitor who isn't signed in. It opens the public pages, makes sure the locked doors are still locked, and asks the site to check its own video list and sign-in settings. It never signs in and never changes anything.
6functions tested
11checks every round from Ireland, Virginia and Tokyo
15minutes between rounds, day and night
4places, adding an hourly look from mainland China at the home page and self-check
0sign-ins, and nothing is ever changed
Who tests what
GuestTesters
status.dliu.comIreland, Virginia and Tokyo every 15 minutes; mainland China every hour
Status pageShows each function as up, slow or down
HTTPS as a guest, never signed in
EdgeCloudFront
PagesThe home page and /docs open with the menu bar
Video listThe public list of videos opens
Player and embedsA watch page, an embed player and the player program, for a placeholder video
Only /health, /auth/login and /api/me go on to the backend
On demandAPI
Self-check/health asks the site to look at its own storage and sign-in settings
Microsoft sign-in/auth/login must send guests on to Microsoft
Owner tools lock/api/me must turn guests away
Tools API lockThe tools API must turn away callers without a pass
One quick read each, nothing is written
PrivateAWS account
Video bucketDoes storage answer?
Parameter StoreCan the sign-in settings be read?
Every check only reads, so testing can never change a video, a title or a setting.
One round of checks
1Status checkerSets out from four places, as a guest, never signed in
2Public pagesHome, docs, watch page, embed player and video list open
3Locked doorsSign-in goes to Microsoft; the owner tools turn guests away
4Site self-checkThe site takes one look at its video storage and sign-in settings
5Status pagestatus.dliu.com shows each function as up, slow or down
When a check fails
UpEvery check got the answer it expected, quickly
Tried again at onceIf a check goes wrong, it is tried once more straight away, to avoid false alarms
SlowStill wrong for one round, or right but slower than usual
DownWrong two rounds in a row (30 minutes)
Each function
Function
What it does for you
How it's tested
Working
Not working, you'd notice
Pages
Shows the home page and these docs.
Opens the home page (/) and the docs page (/docs) and looks for the menu bar.
Both pages open with the menu bar
An error page instead of the site
Video list and storage
Keeps the list of videos and the video files.
Opens the public video list, and the site's /health self-check sees that storage answers.
The list opens and storage answers quickly
An empty home page, and no video opens
Player and embeds
Plays videos here and inside other sites, such as the blog.
Opens a watch page, an embed player and the player program for a placeholder video, so it never depends on which videos exist.
All three open
Videos don't play here or in the blog
Microsoft sign-in
Lets the owner sign in with Microsoft.
Opens /auth/login and sees it go to Microsoft without signing in; the /health self-check reads the sign-in settings.
Sign-in goes to Microsoft
The owner can't sign in; watching still works
Owner tools lock
Keeps uploads, edits and deletes for the owner only.
Asks /api/me "who am I?" without signing in, and must be turned away.
Guests are turned away
Nothing you'd see, so a guest getting in is reported as down at once
Tools API lock
Keeps the API for tools and AI agents closed to anyone without a Microsoft pass.
Asks the tools API's /api/me without a pass, and must be turned away.
Guests are turned away
Nothing you'd see, so a guest getting in is reported as down at once
How many checks each function gets
Visit by the checker, as a guestThe site's own self-check
Pages2
Video list and storage2
Player and embeds3
Microsoft sign-in2
Owner tools lock1
Tools API lock1
What isn't tested
These all need the owner to sign in, and the checker never does, so they are covered by the code tests and by the owner.
Signing in at Microsoft and getting a session
Uploading, replacing, editing and deleting videos and posters
Converting uploads into streaming versions
Using the tools API with a real Microsoft pass
Playing a particular video, because which videos exist changes
Watching needs no API. The API lets tools, scripts and AI agents that the owner trusts manage videos on the owner's behalf: list, upload, replace, edit and delete. They first sign in with Microsoft and get a pass that only allows particular things.
10endpoints
3permissions: read, change, delete
2checks of every pass: gateway and site
50 GiBlargest video file
0passwords kept by this site
Who can reach the API
CallersTools and agents
AI agentsAct for the owner, with only the permissions they were given
Tools and scriptsRun by the owner from a computer
Microsoft sign-inThrough auth.dliu.com; gives a pass that expires
HTTPS, with the Microsoft pass on every request
GatewayAPI Gateway
Pass checkGenuine, current and allowed for this endpoint, or turned away
Speed limitAt most 10 requests a second, so a flood costs almost nothing
Only requests that passed the gateway
On demandAPI
API LambdaChecks again who it is and which app sent it, then does the work
MediaConvertMakes the streaming versions after 2 quiet hours, or on request
Reads and changes only the videos and their list
PrivateAWS account
Video bucketVideos, posters and the video list
Upload linksFiles go straight into storage with short-lived links
A website session and an API pass are separate: neither one works in place of the other.
How a tool signs in and calls the API
1Tool or AI agentActs for the owner
2Microsoft sign-inSigns in through auth.dliu.com and gets a pass that expires
3API gatewayChecks the pass is genuine, current and allows this endpoint
4Site functionChecks again who it is and which app sent it, then does the work
5Video storageThe video list and files are read or changed
Uploading a video
1StartTell the site the file's name, size and title
2Get upload linksOne short-lived link per piece of the file, like a temporary key
3Send the piecesThe file goes straight into storage, not through the site
4Finish = publishedThere are no drafts: everyone can watch it at once
5Streaming versionsMade after 2 quiet hours, or straight away on request
The endpoints
Endpoint
What it's for
Permission
/api/me
Check who the pass belongs to
Read
/api/videos
List every video and its streaming status
Read
/api/uploads
Start uploading a new video, or replacing a video's file
Change
/api/uploads/parts
Get the temporary links for the file's pieces
Change
/api/uploads/complete
Finish the upload and publish it
Change
/api/uploads/abort
Cancel an unfinished upload
Change
/api/videos/update
Edit the title and description, or attach a new poster
Change
/api/videos/poster
Get a temporary link to upload a new poster
Change
/api/videos/convert
Make the streaming versions now
Change
/api/videos/delete
Delete a video
Delete
Endpoints per permission
Read2
Change7
Delete1
Change does not include delete: deleting needs its own permission.
Two ways in
The website
The tools API
Who uses it
The owner, in a browser
Tools, scripts and AI agents
How they prove who they are
Sign in here with Microsoft; the browser keeps the session
A Microsoft pass with every request
What it can do
Upload, edit, delete
The same, but only what the pass allows
Interchangeable?
No: a website session can't call the API
No: an API pass can't sign in to the website
Good to know
Finishing an upload publishes it; replacing a file changes what every link and embed plays.
Deleting is permanent; there is no recycle bin.
Upload links are like keys: never paste them into chats, logs or code.
Do one thing at a time to a video, and send only the changes you mean.
How to get a pass is described once, in the Auth API documentation.