Production-grade platform engineering handbook — Kubernetes, Terraform, Flux CD, GitHub Actions, AWS, and more.
67
84%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Status: Stable
Production-ready AWS platform patterns — CloudFront, WAF, Lambda@Edge, Firewall Manager, and IAM.
| Directory | Description |
|---|---|
| cloudfront/ | CloudFront distribution with S3 + ALB origins, OAC, security headers, CloudFront Functions, Lambda@Edge |
| waf/ | WAF WebACL (CLOUDFRONT scope, us-east-1) with managed rules, rate limiting, geo blocking, logging |
| firewall-manager/ | Firewall Manager WAF policy for multi-account enforcement via AWS Organizations |
| iam/ | IAM least-privilege patterns: IRSA, OIDC federation, no static credentials |
# Deploy WAF first (CLOUDFRONT scope requires us-east-1)
module "waf" {
source = "./waf"
name = "my-app"
providers = { aws.us_east_1 = aws.us_east_1 }
}
# Deploy CloudFront, pass WAF ARN in
module "cloudfront" {
source = "./cloudfront"
name = "my-app"
waf_web_acl_arn = module.waf.web_acl_arn
providers = {
aws = aws
aws.us_east_1 = aws.us_east_1
}
}# Run from the FMS administrator (security) account
module "fms" {
source = "./firewall-manager"
security_account_id = "123456789012"
production_ou_id = "ou-xxxx-yyyyyyyy"
remediation_enabled = false # audit mode first
}aws iam create-policy \
--policy-name my-app-s3-read \
--policy-document file://iam/s3-least-privilege.jsonPods on EKS authenticate to AWS using projected service account tokens — no access keys needed:
# Trust policy pins to specific namespace + service account
assume_role_policy = jsonencode({
Statement = [{
Effect = "Allow"
Principal = { Federated = aws_iam_openid_connect_provider.cluster.arn }
Action = "sts:AssumeRoleWithWebIdentity"
Condition = {
StringEquals = {
"${local.oidc_issuer}:sub" = "system:serviceaccount:${var.namespace}:${var.service_account}"
}
}
}]
})# Pod spec — EKS injects the token automatically
spec:
serviceAccountName: my-app-sa # Annotated with role ARN# ✅ Scoped actions and resources
resource "aws_iam_policy" "app" {
policy = jsonencode({
Statement = [{
Effect = "Allow"
Action = ["s3:GetObject", "s3:ListBucket"]
Resource = [
"arn:aws:s3:::my-bucket",
"arn:aws:s3:::my-bucket/*"
]
}]
})
}
# ❌ Never: Action = "*" or Resource = "*"permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/github-actions-terraform
aws-region: eu-central-1default_tagsweb_acl_arn output to CloudFront waf_web_acl_arnaws.us_east_1 aliasenable_lambda_edge = true; deployed to us-east-1 automatically, uses numbered version ARNenable_cloudfront_function = true; ~6× cheaper than Lambda@Edge for URL rewritesremediation_enabled = false to review compliance dashboard before enforcing/platform-skills:aws — structured guidance for CloudFront, WAF, Lambda@Edge, and multi-account patterns.claude-plugin
.github
commands
docs
examples
agent-self-improve
argocd
awesome-docs
aws
cloudfront
functions
lambda-edge
functions
azure
compliance
conventional-commits
datadog
llm-observability
demo
documentation
dora
dynatrace
fluxcd
github-actions
composite-actions
configure-cloud
db-migrate
docker-build-push
k8s-deploy
notify-slack
pr-comment
release-tag
security-scan
setup-env
setup-terraform
terraform-plan
helm
web-service
templates
kubernetes
kyverno
mcp
observability
openshift
pr-review
ownership
runtime-security
supply-chain
terraform
references
scripts
skills
platform-skills
tests