brenda-nails.com / infrastructure
A small business site where nothing is always on. The pages are static files behind a CDN, the owner edits her own content, and a single function handles both the content and the bookings — which is why the whole thing costs a few pounds a month instead of a few hundred.
A customer
Opens brenda-nails.com, usually on a phone
Route 53
Resolves the apex and www to the nearest edge
Both names on one distribution — no redirect hop
ACM certificate
TLS terminates at the edge
Issued in us-east-1, DNS-validated, renews itself
CloudFront Function
Rewrites /treatments to /treatments/index.html before the cache is consulted
Runs on viewer-request, sub-millisecond, no cold start
CloudFront
Serves the page from the edge closest to the customer
Most requests stop here and never reach London
S3
The built Astro site — reached only on a cache miss
Public access blocked — only CloudFront can read it, via OAC
Fetching a file from brenda-nails.com to time the real path…
The page asks for content
Prices, treatments and opening hours are not baked into the build
GET /cms-data
API Gateway
HTTP API exposing exactly two routes and nothing else
CORS pinned to one origin
Lambda
Reads from the CMS and hands back only the fields the page needs
Node.js 20 · SDK keep-alive enabled to cut handshake time
Webiny headless CMS
Where the owner edits her own prices and treatments
The API key stays in the function — never in the browser
Calling the live endpoint to time the real path…
Customer sends a request
Name, treatment and preferred time
POST /contact
API Gateway
Same HTTP API, second route
Rejects anything not sent from brenda-nails.com
Lambda
Validates the request, then notifies both sides
Its role may send mail and publish to one topic — nothing else
CloudWatch
Every request logged, kept for 14 days
Off the path — a logging failure cannot lose a booking
Simple Email Service
Confirmation to the customer, details to the studio
Sent from a verified domain, DKIM-signed
SNS
Publishes the same booking to a topic
Publish is scoped to this one topic ARN
Brenda's phone
A text arrives while she is with a client, without her checking email
A booking is a message, not a record to manage. Sending it to the people who act on it removes a database, its backups and its bill — and the studio keeps using the diary it already trusts.
/treatments into /treatments/index.html during the viewer request. It runs before the cache lookup, costs a fraction of Lambda@Edge, and keeps the bucket a plain file store.