Building the Wedding Website

November 10, 2026

2026· angular· typescript· aws· cdk· lambda· project

One-Line Summary

What started out as a simple wedding announcement page slowly morphed into a multi-staged password-protected registration and wedding party coordination site.

Why Build It

  1. I was bored. Sure, there was a ton of other planning and work that needed to be done, but why not procrastinate a little and make a simple website for fun?
  2. Try to save money. There are free, or mostly free, website hosting options readily available but I thought it would be more fun to see if creating it myself would be at or under the price of the “competition”.
  3. It’s fun. If you do it yourself, you have full creative freedom to create your own problems, problem solve, and see how much you can shitpost. Sounded good to me.

Check it out yourself if you’re real bored.

Constraints

  • Static hosting. See what still functions and what constraints happen with static hosting.

No real plan outside of that. See what happens as the build progresses and figure out how to make it work.

Process

The site grew in four stages. Each one added a feature, and most of them added a piece of AWS to support it.

Stage Front end AWS added
1. Announcement one Angular app S3, CloudFront, Route 53
2. Gated site login app at /, main site at /w/ Lambda@Edge, API Gateway, a Lambda for login, DynamoDB token table, Secrets Manager, WAF, ACM, all moved into CDK
3. Registration RSVP form a Lambda for RSVPs, DynamoDB RSVP table
4. After party after-party app at /s/ a third CloudFront behaviour, POST /secret, a party flag on the token

1. Initial public announcement page

The first version was a single public page with the announcement on it. It was meant as a public message about the marriage. More formal invitations would go out later, so the page didn’t need to carry any details.

The first version was an Angular app with a photo, a nav bar and a background. Hosting was as simple as it gets: the built files in an S3 bucket with CloudFront in front of it for HTTPS and caching.

Architecture at this stage:

  • One Angular app, built to static files
  • An S3 bucket holding the build
  • CloudFront in front of the bucket for HTTPS and caching
  • A Route 53 alias record pointing the domain at CloudFront
Stage 1 architecture: the public announcement A guest's browser requests the domain. Route 53 points it at CloudFront, which serves the built Angular app from an S3 bucket over HTTPS with caching. Added in this stage Route 53 Guest’s browser CloudFront HTTPS + caching S3 bucket Angular build

2. Pivot to hosting all information

Why not actually host all the wedding party information on the site?

Over the next couple of weeks the one page became a full site: home, story, travel, registry and RSVP pages, with a hamburger menu for mobile.

All of that information needed to be gated, so authentication came next. The first attempt was a login page inside the same app with an Angular route guard in front of every other page. That hid the information without protecting it. A route guard only decides what the Angular router renders. Every page, image and script was still in the bucket, and CloudFront would serve any of them to anyone who asked for the URL directly.

The fix was to move the check into CloudFront. That caused the split into a second “app”, with edge validation to separate the assets being served. CloudFront chooses how to handle a request by its path, so the public part and the protected part had to live under different paths:

  • Login app at /: public, served from the bucket’s login/ prefix. It’s a single password form, and the only thing anyone can load without a cookie.
  • Main site at /w/*: served from the wed/ prefix, with Angular’s baseHref set to /w/ so its links and assets resolve under that path.

Both apps live in one private S3 bucket. CloudFront reads it through Origin Access Control, and all public access is blocked. The client-side route guards and the in-app login page were deleted in the same change that added the edge check.

Architecture added at this stage:

  • Lambda@Edge, on the viewer request event, so it runs before CloudFront checks its cache. For /w/* it reads the api-token cookie and looks it up in DynamoDB. It returns a 401 if the token is missing, unknown or expired. It also rewrites folder-style URLs to index.html, since S3 has no directory indexes.
  • API Gateway and a login Lambda on an api. subdomain. POST /auth compares the submitted password against one stored in Secrets Manager. If it matches, the Lambda stores a random UUID in a DynamoDB table with a 60-day expiry and a TTL. It then returns the UUID as an HttpOnly, Secure cookie scoped to the parent domain, so the edge function on the apex can read a cookie set by api..
  • AWS WAF on the distribution because the login form is public. It only allows traffic from the US and Canada and adds AWS’s managed IP reputation, common and known-bad-inputs rule sets.
  • An ACM certificate for the apex and a wildcard, covering both the site and api..
  • CDK. All of it moved into four stacks, deployed in order: Route 53 → Secret → Api → CloudFront. Everything is in us-east-1, because Lambda@Edge, CloudFront certificates and CloudFront-scoped WAF all require it. The password secret is created by hand and imported, so its value never appears in a template.

Caching started out disabled while the edge function was being debugged, and was turned on (CachingOptimized) a few days later. That was safe because the token check runs before the cache. A cached page still can’t be served without a valid cookie.

The move to S3 hosting also shrank the photos from about 3.5–4 MB each to about 700 KB.

Stage 2 architecture: the gated site Requests to the domain pass through AWS WAF, which only admits US and Canadian traffic, to CloudFront. CloudFront serves the login app at / and the main site at /w/* from one private S3 bucket. A Lambda@Edge function checks the guest's token cookie against a DynamoDB token table before serving /w/*. The login form posts to API Gateway on the api subdomain, where a login Lambda checks the password in Secrets Manager and writes a token to DynamoDB. Everything is defined in four CDK stacks in us-east-1. Added in this stage Route 53 apex + api. records Guest’s browser WAF US + Canada only CloudFront / · /w/* Lambda@Edge token check S3 bucket (private) login/ ← / wed/w/ ← /w/* API Gateway api.<domain> Login Lambda POST /auth Secrets Manager guest password DynamoDB token table All in CDK, in us-east-1: Route 53 → Secret → Api → CloudFront stacks, plus an ACM certificate for the apex and a wildcard.

3. Registration

Add components to actually RSVP for the event with the required information.

The RSVP form went into the main site alongside the move to edge auth, and its backend followed shortly after. Spinners, toasts and a success message came later, as polish.

  • The form collects a first name, last name, phone number and whether the guest is attending, with an optional plus-one. Phone numbers are checked as E.164 with google-libphonenumber for easy validation.
  • PUT /rsvp goes to a second Lambda behind the same API Gateway. The cookie goes with the request, because the browser sends it to api. as well. The Lambda checks the token against the same DynamoDB auth table the edge function uses, so only a logged-in guest can RSVP.
  • A second DynamoDB table stores each RSVP, keyed on first and last name, lowercased, with the phone number and attendance.
  • A plus-one is a second PUT, sent in parallel with the first.
  • The RSVP Lambda can write RSVPs but only read the auth table.

There’s no admin page. RSVPs were read straight out of the table in the DynamoDB console or with aws dynamodb scan.

Stage 3 architecture: registration Adds an RSVP Lambda behind the same API Gateway at PUT /rsvp. It reads the token table to confirm the guest is logged in and writes to a new DynamoDB RSVPs table. The rest of the stage 2 architecture is unchanged. Added in this stage Route 53 apex + api. records Guest’s browser WAF US + Canada only CloudFront / · /w/* Lambda@Edge token check S3 bucket (private) login/ ← / wed/w/ ← /w/* API Gateway api.<domain> Login Lambda POST /auth RSVP Lambda PUT /rsvp DynamoDB RSVPs table Secrets Manager guest password DynamoDB token table

4. After party

Only certain groups should have information about the after party. A second section was added to support that, mirroring the authentication and app split between the main site and the bucket.

Instead of issuing a second token, the after-party is a second tier on the guest’s existing one:

  • A second password sits in the same Secrets Manager secret as the first.
  • A hidden page at /w/secret in the main site has a form that sends the second password to POST /secret. The same login Lambda handles it. If the password matches, it marks the guest’s existing token as approved. It uses a conditional DynamoDB update that only sets party = true if the token exists and hasn’t expired, so a made-up or expired token can’t be approved.
  • A third Angular app for the after-party, built with baseHref /s/ and served from a third CloudFront behavior, /s/*, in the same bucket.
  • One more check in the edge function. For /s/*, a valid token isn’t enough. If the token isn’t party-approved, the guest gets a 302 back to /w/secret instead of the page.

The result is one cookie and one login, with two levels of access. Approval lives on the server, so there’s nothing in the browser for a guest to change to unlock it.

Stage 4 architecture: the after party Adds a /s/* CloudFront behaviour serving the after-party app from the same bucket. The Lambda@Edge function additionally checks a party flag on the token for /s/*. The login Lambda handles POST /secret, checking a second password in Secrets Manager and setting the party flag on the guest's existing token. Added in this stage Route 53 apex + api. records Guest’s browser WAF US + Canada only CloudFront / · /w/* · /s/* Lambda@Edge token check + party check S3 bucket (private) login/ ← / wed/w/ ← /w/* wed/s/ ← /s/* API Gateway api.<domain> Login Lambda POST /auth · /secret RSVP Lambda PUT /rsvp DynamoDB RSVPs table Secrets Manager guest passwords DynamoDB token table · party flag

Result

Front end 3 Angular 21 apps, fully prerendered
Infrastructure 4 CDK stacks, 3 Lambda handlers, 2 DynamoDB tables
Auth shared password → 60-day HttpOnly cookie, checked at the edge on every request
Deploy manual: CDK, then ng build + s3 sync + invalidation
Tests 5 Jest unit-test files for the Lambdas
Image assets about 7.6 MB in the main app, plus a single 14 MB image in the after-party app
Monthly cost ~$15 per month. The biggest fixed cost is WAF, at about $9/month.

What I’d Change

  • It’s not mobile optimized, at all.
  • Throw the entire thing into Amplify or Lightsail instead of static-ish on S3.
  • Compress the images (WebP or AVIF would cut them by roughly 70–90%).
  • Make it pretty. It’s a fairly ugly website but that’s fine. It got the job done.
  • Set a budget and actually try to keep the site under that budget.
  • Fully flesh out security management and token rotation.

Was it worth it?

Yeah, why not. It was fun to muck around, trying to solve problems I intentionally created for myself by enforcing limitations for no reason other than it sounded interesting. It also got me back into building things for myself and just for the fun of it.