Blueprints

Patterns, assembled into systems.

A blueprint is a composed solution. When it ships, it is an opinionated root module with a production-ready quickstart that wires several components together. Blueprints in design show the shape before the module exists.

In Terraform a shipped blueprint is a module, and so is every component. The blueprint names the role; the module is the artifact.

05 blueprints

Production

Serverless SSR

Deploy a server-rendered application on multi-region Lambda behind CloudFront, with automatic failover.

Serverless SSR composes the SSR delivery components into one root module: Lambda for requests, S3 for static assets, CloudFront for edge delivery and failover, and Route 53 and ACM for a custom domain. Reach for it when you want a working site, not a pile of resources.

Web delivery only. Authentication, application APIs, and data are separate concerns; add the identity and data components when you need them.

Production

Internet Ingress

A reusable customer-facing front door: terminate at CloudFront, reach private backends through VPC origins, and shift between blue and green at the edge.

Internet Ingress composes the ingress components into one root module: a CloudFront distribution with WAF and logging, one VPC origin per deployment, an edge router (Function, KeyValueStore, and sync Lambda), and the Parameter Store path for rollout. The caller provides existing private origin ARNs; the module owns the ingress.

Does not create the load balancer or the backend, and authentication is out of scope. Single region by default, with optional DR failover. Edge blue and green is near-instant but not atomic, and cache keys must include the deployment colour.

Design

Web application platform

For applications where users sign in, browse server-rendered pages, and work with shared data through an API.

Keep page delivery, authentication, and application data connected without coupling them into one service. Adapt access rules and API behavior to your application.

Patterns expressed

In design · not yet a shipped module

Cognito handles authentication separately from content delivery. Identity recovery requires a separate plan; adding regional compute and data does not recover user pools automatically.

Design

Event-driven services

For applications that react to events or move background work out of the user request, from notifications to data processing.

Queues buffer work while consumers process it independently. Choose retry and failure handling for each workload, and add consumers as new needs emerge.

In design · not yet a shipped module

Retries, dead-letter handling, idempotency, and regional recovery need explicit configuration and testing. Cross-region endpoints do not provide automatic full failover.

Design

Multi-region SaaS foundation

For products whose availability requirements call for regional application resources and replicated data.

Bring delivery, identity, APIs, and data into one regional recovery design. Routing, user recovery, and failover exercises remain explicit application decisions.

In design · not yet a shipped module

Cross-region endpoints and replicated data are not automatic full failover. Plan and test routing, application recovery, and event handling; Cognito identity recovery remains a separate concern.

The root module pattern

Connect the building blocks.

A root module is the assembly layer for a product or platform. It chooses versions, names resources, configures providers, and connects outputs. Components remain focused, portable, and easy to replace.

Illustrative wiring, not a standalone configuration. Supply provider requirements and aliases, module versions, required inputs, and your own schema.graphql. Follow each component's documentation before deployment.

platform/main.tf
module "identity" {
  source = "pomo-studio/cognito-auth/aws"
}

 module "data" {
   source     = "pomo-studio/dynamodb-global-table/aws"
   name       = "my-app-users"
   hash_key   = "id"
   attributes = [{ name = "id", type = "S" }]
 }

 module "api" {
   source                = "pomo-studio/appsync/aws"
   name                  = "my-app-api"
   schema                = file("${path.module}/schema.graphql")
   cognito_user_pool_arn = module.identity.user_pool_arn
   dynamodb_data_sources = {
     users = {
       table_name = module.data.table_name_primary
       table_arn  = module.data.table_arn_primary
     }
   }
 }
platform/providers.tf
provider "aws" {
  alias  = "primary"
  region = "us-east-1"
}

provider "aws" {
  alias  = "dr"
  region = "us-west-2"
}

module "events" {
  source = "pomo-studio/event-bus/aws"
  providers = {
    aws.primary = aws.primary
    aws.dr      = aws.dr
  }
  enable_dr = true
}