Time to deploy: 10 minutes ⏱️
Get a production-ready Buildkite stack with auto-scaling agents on AWS.
Get a production-ready Buildkite stack with auto-scaling agents on AWS.
Overview
The Buildkite Stack pattern deploys a complete CI/CD infrastructure including:- Auto-scaling EC2 agents (spot instances for cost optimization)
- S3 bucket for artifact storage
- Secrets Manager for API tokens
- CloudWatch logs and metrics
- VPC with proper security groups
Quick Start
- Buildkite agent token
- Instance types and scaling policies
- VPC configuration
- S3 bucket settings
Architecture
Components
- ECS cluster with Buildkite agents
- Auto-scaling group (1-10 agents)
- Application Load Balancer
- S3 bucket for build artifacts
- CloudWatch dashboard
Configuration
Cost Optimization
This pattern uses several cost-saving features:- Spot Instances: Save up to 90% on compute costs
- Auto-scaling: Only pay for what you use
- S3 Lifecycle Policies: Automatically archive old artifacts
Customization
Adding GitHub Integration
Custom Agent Configuration
Monitoring
The stack includes pre-configured CloudWatch dashboards:- Agent utilization
- Build queue depth
- Failed builds
- Cost tracking