Deployment Guide
Note: Production infrastructure (VPC, ECS, Aurora, S3, IAM, Prefect API, etc.) is now defined and deployed from the separate
blog_infrarepository (see itsinfra/envs/prodstack). Use that repo to apply Terraform; this document focuses on the application-side pieces forblog_data.
How deployment works
Application deployment for blog_data is now handled entirely by CircleCI and
a Prefect deployer ECS task defined in the blog_infra repository:
- You push to
main,pipeline, orecsinrlhatcher/blog_data. - CircleCI builds the
blog_dataDocker image and pushes it to theblog-dataECR repository tagged with the git commit SHA. - CircleCI runs the
deploy-to-prefectjob, which:- Assumes an AWS IAM role using STS.
- Starts a one-off Prefect deployer ECS task (from
blog_infra). - That task clones
blog_data, installs it, and runsprefect deploy --allagainst the self-hosted Prefect API athttps://pipelines.rocketclub.online.
- 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.
Infrastructure (VPC, ECS services, ALB/CloudFront, Aurora, etc.) is provisioned
and updated from the blog_infra repo; see that repo’s docs for Terraform
commands and infra rollbacks.
Visual overview
For a high-level view of how the Prefect worker pool and CI/CD fit together,
see the generated diagrams under docs/diagrams/:
-
Prefect runtime:

-
CI & Prefect deployer:

These diagrams are generated from code using generate_architecture_diagram.py.
See ARCHITECTURE.md for generation instructions.
Day-to-day deployment
For practical deployment tasks, use the following documents:
- CircleCI Setup Guide – how CircleCI connects to AWS and Prefect.
- CircleCI Deployment Guide – detailed behavior
of the
build-and-push-imageanddeploy-to-prefectjobs. - Quick Start Deployment – 5-minute path from zero to automated deployments.
- Deployment Checklist – end-to-end checklist for verifying a deployment.
- Prefect Work Pool Configuration – details
of the
blog-data-poolECS work pool and how it is managed by the Prefect deployer.
This DEPLOYMENT.md file is intentionally high-level – treat code and
prefect.yaml as the source of truth for deployments, and use blog_infra
for all production infrastructure changes.