Files
acdl/modules/l2/static-assets/README.md
T
Jon Chery 2682719f24
acdl-ci / Lint (push) Successful in 7s
acdl-ci / Test (push) Successful in 26s
acdl-ci / Platform check-only (offline) (push) Successful in 8s
docs(P47): presentation slide updates + HIPAA removal from all docs
Presentation changes (both Marp decks + source markdown):
1. Title slide: deck title as H1 (slightly bigger), 'Agentic Cloud Delivery
   Platform' as H3 subtitle — cleaner title hierarchy
2. DX deck: removed Local Reproducibility slide (not beneficial for DX)
3. DX deck: Safe Promotion Path slide redesigned with side-by-side layout
   for Approaches A and B (HTML table, two columns)
4. DX deck: 'an agent' → 'an AI agent' (slide 2 + Citizen Developer slide)
5. DX deck: What a Developer Does — diagram floated to the right side
6. Header simplified to just the deck name (subtitle now on title slide)

HIPAA removal (25 files):
- Completely removed all HIPAA references from all markdown documentation,
  presentation source files, module READMEs, and rendered HTML
- Removed HIPAA from compliance milestone lists (GDPR, SOX, SOC2, DORA remain)
- Removed HIPAA section references (§164.xxx) from compliance annotations
- Cleaned up empty parentheses and broken commas left by removal
- Re-rendered both HTML decks from updated Marp source

---ci---
phase: 47
milestone: v1.9
status: complete
requirements:
  covered: []
  partial: []
---/ci---
2026-07-23 14:08:40 +00:00

142 lines
4.4 KiB
Markdown

# static-assets — Production static asset stack (S3 + CloudFront + WAF)
> **Module kind:** module pattern | **Version:** 1.0.0
A production-ready pattern that references the `s3`, `cloudfront`, and
`waf` primitives to deploy a static asset site with a CloudFront CDN
edge (S3 origin via Origin Access Control) and WAF protection. A simpler
S3-only variation is documented below.
## Resources
The pattern references these primitives:
| Primitive | Purpose | README |
|-----------|---------|--------|
| `s3` | S3 bucket (origin) | [README](../l1/s3/README.md) |
| `cloudfront` | CloudFront distribution + OAC | [README](../l1/cloudfront/README.md) |
| `waf` | WAFv2 Web ACL (CloudFront-scoped) | [README](../l1/waf/README.md) |
## Inputs
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `bucket_name` | string | yes | Globally-unique S3 bucket name |
| `region` | string | yes | AWS region the bucket is created in |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| `distribution_domain_name` | string | The CloudFront distribution domain name |
| `bucket_arn` | arn | The S3 bucket ARN |
| `web_acl_arn` | arn | The WAF Web ACL ARN |
## Usage
Define a contract referencing this module (the production stack —
S3 + CloudFront + WAF):
```yaml
uses: acdl/pipelines/deploy.yaml@v1.6
module: static-assets
environment: dev
inputs:
bucket_name: my-static-assets
region: us-east-1
```
The composition wires the s3 bucket regional domain name to the
CloudFront origin and the WAF web ACL ARN to the CloudFront distribution
automatically.
### Simpler variation (S3 only)
For a simple S3-only static asset site (no CDN, no WAF), a consumer can
declare a contract that references the `s3` primitive directly:
```yaml
uses: acdl/pipelines/deploy.yaml@v1.6
module: s3
environment: dev
inputs:
bucket_name: my-static-assets
region: us-east-1
```
This deploys a single S3 bucket (no CloudFront edge, no WAF). Use this
for low-traffic internal sites where a CDN edge is not required.
See the [consumer guide](../../docs/consumer-guide.md) for a
step-by-step walkthrough, and the [s3](../l1/s3/README.md),
[cloudfront](../l1/cloudfront/README.md), and [waf](../l1/waf/README.md)
READMEs for the underlying primitives.
## Compliance extension points
The pattern can wire compliance resources when the compliance
milestone (GDPR, SOX, SOC2, DORA) lands:
- **KMS key** — shared encryption key for S3 SSE.
- **S3 access logs** — access logging to a separate audit bucket.
- **Object Lock** — 7-year immutable retention for evidence.
- **Public access block** — prevent data exfiltration.
- **CloudFront TLS/HTTPS** — viewer protocol policy defaults to
`redirect-to-https`; a custom ACM certificate can pin TLS to a
customer domain.
- **CloudFront geo restriction** — whitelist/blacklist countries for
data-residency compliance.
- **CloudFront logging** — access logs to an S3 bucket for auditability.
- **WAF rate limiting / geo blocking / custom rules / logging** — see
the [waf README](../l1/waf/README.md).
See the per-primitive READMEs for the per-module compliance extension
points.
## Examples
Validated example contracts are in [`examples/`](examples/). The platform-test
pipeline validates them against `schemas/contract.schema.json`.
### Simple
A minimal deployment (S3 bucket only — no CloudFront/WAF):
[`examples/simple.yaml`](examples/simple.yaml)
```yaml
# Simple static-assets deployment (S3 bucket only — no CloudFront/WAF)
# This is the simplest way to deploy a static site: just an S3 bucket.
uses: acdl/pipelines/deploy.yaml@v1.6
module: static-assets
environment: dev
inputs:
bucket_name: my-static-site
region: us-east-1
```
### Complex
A production deployment with optional inputs (S3 + CloudFront + WAF):
[`examples/complex.yaml`](examples/complex.yaml)
```yaml
# Complex static-assets deployment (S3 + CloudFront + WAF)
# The full production stack: S3 origin + CloudFront CDN edge + WAF protection.
uses: acdl/pipelines/deploy.yaml@v1.6
module: static-assets
environment: dev
inputs:
bucket_name: my-production-static-site
region: us-east-1
price_class: PriceClass_100
viewer_protocol_policy: redirect-to-https
default_ttl: 3600
max_ttl: 86400
waf_enabled: true
```
## Versioning
`1.0.0` — interface MAJOR, behavior MINOR, lifecycle PATCH. MAJOR bumps
require a new registry entry (immutable publication); old entries enter
a 12-month deprecation window.