Skip to content

Deployment guide

This guide covers deploying ABCA into an AWS account, including compute backend choices, scale-to-zero characteristics, and the complete AWS service inventory. For day-to-day development workflow, see the Developer guide. For a quick first deployment, see the Quick start. For least-privilege IAM deployment roles, see DEPLOYMENT_ROLES.md.

ABCA deploys as a single CDK stack (backgroundagent-dev) containing all platform resources. The stack uses a ComputeStrategy interface to support two compute backends within the same stack:

AspectAgentCore (default)ECS Fargate (opt-in)
ComputeBedrock AgentCore Runtime (Firecracker MicroVMs)ECS Fargate containers
Resources2 vCPU, 8 GB RAM, 2 GB max image size2 vCPU, 4 GB RAM
OrchestrationDurable Lambda (checkpoint/replay)Same durable Lambda via ComputeStrategy
Agent modeFastAPI server (HTTP invocation)Batch (run-to-completion)
Startup~10s (warm MicroVM)~60-180s (Fargate cold start)
Max duration8 hours (AgentCore service limit)9 hours (orchestrator executionTimeout)

Both backends are orchestrated by the same durable Lambda function. The ComputeStrategy interface abstracts startSession(), pollSession(), and stopSession() — the ECS strategy calls ecs:RunTask / ecs:DescribeTasks / ecs:StopTask directly from the Lambda. No Step Functions are used.

ECS Fargate is currently opt-in — the EcsAgentCluster construct is present in the stack code but commented out. To enable it, uncomment the ECS blocks in cdk/src/stacks/agent.ts.

Components that scale to zero (pay-per-use)

Section titled “Components that scale to zero (pay-per-use)”
ComponentBilling ModelIdle Cost
DynamoDB (6 tables)PAY_PER_REQUEST$0
Lambda (all functions)Per invocation$0
API Gateway RESTPer request$0
ECS Fargate tasks (when enabled)Per running task$0 (cluster is free)
AgentCore RuntimePer session$0
Bedrock inferencePer token$0
AgentCore MemoryProportional to usage~$0
CognitoFree tier (50K MAU)$0

Components that do not scale to zero (always-on)

Section titled “Components that do not scale to zero (always-on)”
ComponentEst. Monthly Idle CostWhy
NAT Gateway (1x)~$32$0.045/hr fixed charge
VPC Interface Endpoints (7x, 2 AZs)~$102$0.01/hr × 7 endpoints × 2 AZs × 730 hrs
WAF v2 Web ACL~$5Base monthly charge
CloudWatch Dashboard~$3Per-dashboard charge
Secrets Manager (1+ secrets)~$0.40/secretPer-secret monthly
CloudWatch Alarms~$0.10/alarmPer standard alarm
CloudWatch Logs retention~$1-5Storage for retained logs
Total always-on baseline~$140-150/month

The dominant idle cost is VPC networking: 7 interface endpoints across 2 AZs ($102/month) plus the NAT Gateway ($32/month).

For the full cost model including per-task costs, see COST_MODEL.md.

ServiceUsed ByScales to Zero
Bedrock AgentCore Runtime (MicroVMs)Agent sessions (default)Yes
ECS Fargate (when enabled)Agent sessions (opt-in)Yes
Lambda (Node.js 24, ARM64)Orchestrator, API handlers, fanout consumer, reconcilers, custom resourcesYes
ServiceUsed ByScales to Zero
Bedrock (Claude Sonnet 4.6, Opus 4, Haiku 4.5)Agent reasoning, cross-region inference profilesYes
Bedrock GuardrailsPrompt injection detection on task inputYes
Bedrock AgentCore MemorySemantic + episodic extraction strategiesYes
ServiceUsed ByScales to Zero
VPC (public + private subnets, 2 AZs)All computeN/A (no direct cost)
NAT Gateway (1x)Private subnet internet egressNo (~$32/mo)
VPC Interface Endpoints (7x, 2 AZs)AWS service connectivity from private subnetsNo (~$102/mo)
VPC Gateway Endpoints (2x: S3, DynamoDB)S3 and DynamoDB connectivityYes (free)
Security GroupsHTTPS-only egressN/A
Route 53 Resolver DNS FirewallDomain allowlisting for agent egressMinimal
ServiceUsed ByScales to Zero
DynamoDB (6 tables, PAY_PER_REQUEST)Task state, events, nudges, concurrency, webhooks, repo configYes
DynamoDB StreamsTaskEventsTable → FanOut Consumer LambdaYes
S3CDK asset bucket, ECR image layers, FUSE session storage, trace artifacts (7-day lifecycle)Minimal
SQS (DLQ)FanOut Consumer dead-letter queueYes
Secrets ManagerGitHub PAT, webhook HMAC secretsNo (~$0.40/secret/mo)
ServiceUsed ByScales to Zero
API Gateway (REST)Task REST APIYes
Cognito User PoolCLI/API authenticationYes (free tier)
WAF v2API Gateway protection (managed rules + rate limiting)No (~$5/mo base)
ServiceUsed ByScales to Zero
EventBridge (scheduled rule)Stranded task reconciler (every 5 min)Yes (rule is free; Lambda invocation is the cost)
ServiceUsed ByScales to Zero
CloudWatch Logs (multiple log groups)Application, usage, model invocation, VPC flow, DNS query logsNo (storage)
CloudWatch DashboardOperational metrics visualizationNo (~$3/mo)
CloudWatch AlarmsOrchestrator error alertingNo (~$0.10/alarm)
X-RayAgentCore Runtime tracingYes
ServiceUsed ByScales to Zero
CloudFormationStack deployment, custom resourcesN/A
ECRContainer image storageMinimal
IAMRoles and policies for all componentsN/A