v2.4.2

Infrastructure

Infrastructure is split between Terraform and Serverless Framework. Terraform owns shared AWS resources and docs hosting; Serverless owns per-service Lambda stacks and API Gateway methods.

Overview

flowchart TB
  subgraph TF[Terraform Cloud]
    ECI[env-ci: CircleCI contexts]
    EDEV[env-dev: API Gateway, WAF, DynamoDB, S3]
    ESTG[env-staging: stage config]
    EPROD[env-prod: prod account resources]
    EDOCS[env-docs: Cloudflare Pages]
  end
  subgraph SLS[Serverless via CircleCI]
    S1[leads stack]
    S2[marketplace stack]
    SN[other service stacks]
  end
  EDEV --> S1
  EDEV --> S2
  EDEV --> SN
  EDOCS --> CF[Cloudflare Pages]
LayerToolScope
Shared AWS resourcesTerraformplatform/terraform/env-*
Per-service Lambda/API Gateway methodsServerless Frameworkservices/*/serverless.yml
Docs hostingTerraform + Cloudflare Pagesplatform/terraform/env-docs
CI/CDCircleCI.circleci/

Ownership boundaries

  • Terraform creates the shared API Gateway REST API, custom domains, WAF, shared DynamoDB tables, S3 buckets, and docs hosting resources.
  • Serverless services read Terraform-published SSM params and attach paths/functions to the shared API.
  • CircleCI selects which services to package/deploy based on the diff. Changes to shared libs/ can trigger broader service deployment.

Pages

TopicPage
Stack layout, symlinks, backendTerraform layout
Service shape, build, layersServerless
This docs site's Cloudflare Pages projectCloudflare Pages
CircleCI deploy workflow and diff selectionCI/CD
Esc