static-frontend-hosting
Static Frontend Hosting with Edge Authentication
This is a reference pattern. Learn from the approach, adapt to your context — don't copy verbatim.
Problem: Need low-cost, globally distributed frontend hosting with authentication but without requiring users to log in.
Solution: Static site on S3 + CloudFront CDN + Lambda@Edge for transparent authentication.
Pattern
Architecture:
User Request
↓
CloudFront (CDN)
↓
Lambda@Edge (us-east-1) ← Validates token, sets cookies
More from loxosceles/ai-dev
github-actions-oidc-aws
Secure GitHub Actions to AWS authentication using OIDC without long-lived credentials. CRITICAL PATTERN. Apply when setting up CI/CD pipelines that deploy to AWS.
53code-review
Multi-perspective code review strategy covering architecture, security, performance, and quality. Follow when reviewing code or analyzing changes.
51frontend-code-quality
Essential guidelines for clear, maintainable frontend code. Follow when writing or reviewing frontend components, composables, or pages.
51command-execution
Guidelines for executing commands and running scripts. Follow when running shell commands, installing packages, or using project scripts.
51cdk-bootstrap-configuration
CDK synth-time configuration pattern without context caching. Apply when working on CDK infrastructure code or adding new configuration parameters.
50environment-validation
Validate configuration early to fail fast. Apply when writing setup scripts, Lambda cold starts, or any initialization code that depends on environment variables.
50