Multi-Tenant HTTP API with Clean Custom Domains, Wildcard Certificates and Account Slugs

A default HTTP API on AWS exposes an unusable URL such as a1b2c3d4.execute-api.eu-central-1.amazonaws.com.
In multi-tenant environments you want stable, human-readable, tenant-specific URLs that integrate cleanly into your product.
This guide shows how to build exactly that using a wildcard certificate, a custom domain, Route53 alias records and SSM-based account identity.

HTML-to-PDF rendering fails once multi-page layouts, dynamic content, and page numbers are involved. Puppeteer can generate PDFs out of HTML-templates with stable page numbers, but only when its header and footer templates are used correctly.

Following you will find a working approach for dynamic multi-page PDFs with clean page numbers using NodeJS Chromium Puppeteer's header and footer templates.