Component 12

SSR CloudFront Support

The policies a server-rendered CloudFront distribution needs: what to cache, what to forward, and how to reach private origins.

Status

Available component

Deployment scope

Global edge

Example version constraint

~> 0.2

Review published versions ↗

Usage example

Inputs in, outputs out. Illustrative wiring, not a standalone deployment.

Supply an app name. Hand the outputs to the distribution and the storage buckets; this component serves no traffic on its own. Configure provider requirements and credentials in your root module; check the documentation for all required inputs and version changes.

main.tf
module "cloudfront_support" {
  source  = "pomo-studio/ssr-cloudfront-support/aws"
  version = "~> 0.2"

  app_name = "my-app"
}

Key inputs

  • app_name

Useful outputs

  • lambda_oac_id
  • oai_cloudfront_access_identity_path
  • ssr_swr_cache_policy_id
  • lambda_signed_origin_request_policy_id

What you get

01

Origin access control

Lets CloudFront sign requests to a Lambda function URL.

02

Origin access identity

Lets CloudFront read from a private S3 bucket.

03

Cache and origin request policies

Caches rendered pages and decides which headers, cookies and query strings reach the Lambda.

Built with

  • Amazon CloudFront
  • OAC
  • OAI
  • Terraform