AWS ECS Deployment Guide
Deploying Integra on AWS Elastic Container Service (ECS) using AWS Fargate is the recommended production setup.
1. Prerequisites
- AWS Account
- VPC with Public/Private subnets
- ECR Repository (or subscription to AWS Marketplace container)
2. Task Definition
Create a standard Fargate task definition.
integra-task-def.json
{
"family": "integra-prod",
"networkMode": "awsvpc",
"requiresCompatibilities": ["FARGATE"],
"cpu": "512",
"memory": "1024",
"executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"name": "integra",
"image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/priyaiosystems/integra:latest",
"essential": true,
"portMappings": [
{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}
],
"environment": [
{ "name": "INTEGRA_LOG_LEVEL", "value": "info" },
{ "name": "OTEL_EXPORTER_OTLP_ENDPOINT", "value": "http://otel-collector:4318" }
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/integra",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
}
}
]
}
3. Service Configuration
- Launch Type: Fargate
- Load Balancer: Application Load Balancer (ALB)
- Listener: HTTPS (443) -> Target Group (8080)
- Health Check Path:
/health - Auto Scaling:
- Target Tracking: CPU Utilization (70%)
- Min Tasks: 2
- Max Tasks: 10
4. Troubleshooting
"Task Stopped"
Check CloudWatch Logs for /ecs/integra. Common issues:
- IAM Role missing permissions to pull image.
- Memory limit exceeded (increase Task Memory).
"502 Bad Gateway" (ALB)
- Security Group: Ensure ALB SG allows traffic to ECS tasks SG on port 8080.
- Health Check: Verify health check path is
/health(not/).