Prerequisites
- Docker installed and running on your machine - Docker documentation
- AWS CLI installed and configured - AWS CLI setup guide
- Access to Cardinal’s private ECR repository (enterprise clients only)
Getting Started Locally
Before deploying to ECS, you can quickly test Cardinal locally to ensure everything works:Quick Local Setup
Resource Requirements for Local Testing
- Minimum: 8 GB RAM, 4 CPU cores
- Recommended: 32 GB RAM, 8 CPU cores
- Storage: ~2 GB for image + runtime data
Stopping Local Instance
- Verify your Cardinal credentials work
- Test basic functionality before cloud deployment
- Understand resource requirements
- Easy to adapt for other container orchestrators (Kubernetes, Fargate, etc.)
Bedrock Model Access Requirements
For AWS GovCloud Deployments: Cardinal requires access to a fine-tuned model hosted on Amazon Bedrock. Due to GovCloud compliance and data sovereignty requirements, cross-account access from commercial AWS accounts is typically not permitted. Required Setup:- We will need access to deploy our fine-tuned model directly in your AWS GovCloud account, OR
- You will need to provide us with a dedicated Bedrock-enabled AWS GovCloud account within your organization’s compliance boundary
- FedRAMP and other compliance frameworks require all data processing to occur within authorized boundaries
- Cross-account dependencies from commercial AWS to GovCloud violate most security authorization boundaries
- Model inference must happen within your controlled environment
- Preferred: Grant us temporary access to deploy our model in your GovCloud Bedrock service
- Alternative: We can provide model artifacts and training procedures for you to recreate the model in your environment
- Enterprise: We can establish a dedicated GovCloud presence within your compliance boundary
Infrastructure Setup
AWS Infrastructure Prerequisites
Follow AWS documentation to set up the basic infrastructure:- Create an ECS cluster - name it
cardinal-cluster
- Set up IAM roles for ECS - you’ll need both task execution and instance roles
- Create security groups - allow inbound traffic on port 8080 and SSH (port 22) if needed
- Launch EC2 instances with ECS-optimized AMI - see compute requirements below
Cardinal-Specific Authentication
Configure your AWS CLI and authenticate to Cardinal’s ECR:Cardinal Task Definition
Create a task definition filecardinal-task-def.json
with Cardinal-specific configuration:
Deploy and Manage Cardinal
Create and Deploy Service
Update Deployment
When you need to deploy updates:Compute Requirements
Cardinal requires specific compute resources for optimal performance: Required Instance Type: m5.2xlarge or equivalent- vCPUs: 8 cores minimum
- Memory: 32 GB RAM minimum
- Storage: 100+ GB EBS storage
- Network: Enhanced networking enabled
- Provides 8 vCPUs and 32 GB RAM total
- Task allocation: ~6 vCPUs and 28 GB RAM (leaves resources for OS and ECS agent)
- Best price-performance ratio for Cardinal’s workload
c5.2xlarge
: 8 vCPU, 16 GB (compute-optimized, lower memory)m5.4xlarge
: 16 vCPU, 64 GB (for scaling beyond single instance)r5.2xlarge
: 8 vCPU, 64 GB (memory-optimized if needed)
Auto Scaling (Optional)
For production deployments, set up auto scaling:ECS Service Auto Scaling
EC2 Auto Scaling
For automatic instance scaling, follow the AWS Auto Scaling Groups documentation.Load Balancer Integration (Optional)
For production with multiple instances, add an Application Load Balancer following the AWS ALB documentation. Configure health checks to point to Cardinal’s/health
endpoint.
Cost Analysis
Monthly cost for m5.2xlarge (us-east-2):- Instance cost: ~$280/month (24/7 On-Demand)
- EBS storage: ~$10/month (100 GB GP3)
- Total: ~$290/month