How gurjyot-gurz/aws-edge-secured-static-site works
This repository documents a static website delivered through CloudFront from S3, with Lambda@Edge adding security headers to viewer responses. The principal workflow is a browser request, CDN origin retrieval, edge response hardening, and delivery to the browser. The JavaScript also implements client-side terminal animation, section navigation, a live clock, and footer-year display. AWS wiring is described in the README rather than represented by infrastructure source files; frontend markup was not sampled, so its exact asset-loading links are not shown.
Main entry points: index.html Website Page · lambda_function.py Header Handler · styles.css Page Styles · script.js Client Interactions
Components 7
Static Website
- Website Page
src/index.html - Page Styles
src/styles.css - Client Interactions
src/script.js
AWS Delivery
- CloudFront CDN
- S3 Static Origin
Edge Security
- Header Handler
lambda_function.py
Other components
- Visitor Browser
Connections 8
- Visitor Browser → CloudFront CDN: requests content
- CloudFront CDN → S3 Static Origin: fetches origin
- S3 Static Origin → CloudFront CDN: returns content
- CloudFront CDN → Header Handler: invokes on response
- Header Handler → CloudFront CDN: returns hardened response
- CloudFront CDN → Visitor Browser: delivers over HTTPS
- Website Page → Client Interactions: hosts interactions
- Website Page → Page Styles: uses styles