Deployment Guide
Note: Production infrastructure (VPC, ECS, Aurora, S3, IAM, Prefect API, etc.) is defined and deployed from this repository via Terraform (see
infra/platform/infra/envs/prod). This document focuses on the application-side pieces for the data platform (data/platform).
How deployment works
Application deployment for the data platform (data/platform) is handled entirely by CircleCI
and a Prefect deployer ECS task defined in Terraform in this repository, through the
param-gated deploy-data-platform pipeline (the migrated successor to the external blog_data
repo's deploy pipeline — see
ADR-0005):
- You trigger the
deploy-data-platformpipeline parameter (it does not run on push). - CircleCI builds the data-platform Docker image from
data/platform/Dockerfileand pushes it to theblog-dataECR repository tagged with the monorepo commit SHA. - It rebuilds the Prefect deployer image (which bakes
data/platform) and rolls the deployer ECS task definition forward via a prod Terraform apply. - CircleCI runs the
deploy-to-prefectjob, which:- Assumes an AWS IAM role using STS.
- Starts a one-off Prefect deployer ECS task (defined in Terraform).
- That task runs
prefect deploy --allfrom the baked-indata/platform(noblog_dataclone) against the self-hosted Prefect API athttps://pipelines.rocketclub.online, overridingPREFECT_IMAGE_REFERENCEwith the freshly built flow-execution image.
- The Prefect deployer script ensures the
blog-data-poolECS work pool exists with the correct base job template and updates all deployments using the new image tag. - Finally, the pipeline redeploys the four
blog-data-*Lambdas (deploy-flight-lambdas/deploy-ork-lambdas) from the monorepo, so one trigger covers the whole data-platform deploy.
Infrastructure (VPC, ECS services, ALB/CloudFront, Aurora, etc.) is provisioned and updated via Terraform in this repo; see the infrastructure docs for details.
Visual overview
For a high-level view of how the Prefect worker pool and CI/CD fit together,
see the generated diagrams (served from /diagrams/):
-
Prefect runtime:

-
CI & Prefect deployer:

These diagrams are generated from code using data/platform/generate_architecture_diagram.py.
See Pipelines Architecture for generation instructions.
Day-to-day deployment
For practical deployment tasks, use the following documents:
- CircleCI Setup Guide
- CircleCI Deployment Guide
- Quick Start Deployment
- Deployment Checklist
- Prefect Work Pool Configuration
This page is intentionally high-level – treat code and
data/platform/prefect.yaml as the source of truth for deployments.