Ghost requires a MySQL database, persistent storage for content and images, and a way to handle traffic at scale. AWS provides these through RDS Aurora, EFS, S3, and ECS Fargate. This post walks through deploying the core infrastructure using AWS CDK, which allows us to define everything as TypeScript code rather than clicking through the AWS console.
The infrastructure we're building costs approximately $175 per month. The largest costs are the database ($47/month) and NAT Gateway ($32/month) needed for containers to reach external services. Everything deploys with a single CDK command and can be torn down just as easily.
The Architecture
The system consists of Ghost containers with Nginx sidecars running on ECS Fargate, connected to an Aurora Serverless MySQL database, with persistent content stored on EFS. An Application Load Balancer handles incoming traffic, containers in private subnets reach the internet through a NAT Gateway, and CloudFront provides global caching.