Architecture

Cost
Use the AWS Pricing Calculator for detailed estimates.
Prerequisites
1
Install tools
- Install Docker Desktop
- Install uv (Python package manager)
- Install and configure the AWS CLI
2
Create and activate a virtual environment
3
Install Agno
4
Create your codebase
5
Set your API key
Deploy
Step 1: AWS Setup
Choose your preferred method to create the ECR repository and find your subnet IDs:- AWS Console
- CLI
Create ECR repository:
Authenticate Docker with ECR:Click View push commands in the ECR console and run the login command:Find your subnet IDs:
- Open Amazon ECR
- Click Create repository
- Set repository name to
my-agentos - Keep defaults and click Create repository
- Copy the repository URI (e.g.,
[ACCOUNT_ID].dkr.ecr.us-east-1.amazonaws.com/my-agentos)

ECR Create Repository - set the repository name and keep defaults
ECR tokens expire after 12 hours. Re-run this command if you get
authentication errors.
- Open VPC Console → Subnets
- Look for subnets with Auto-assign public IP = Yes
- Note the Subnet IDs for 2+ subnets in different availability zones
Step 2: Configure
1
Update settings
Edit
infra/settings.py with your AWS details:2
Create secrets files
Step 3: Test & Deploy
1
Test locally (optional)
2
Deploy to AWS
- Docker image pushed to ECR
- RDS PostgreSQL instance with pgvector
- ECS Cluster, Service, and Task Definition
- Application Load Balancer with Target Group
- Security Groups for network isolation
RDS takes 5-10 minutes to provision. The deployment will wait for it
automatically.
Step 4: Get Your Endpoint
- AWS Console
- CLI
- Open EC2 Console → Load Balancers
- Find your load balancer (named
my-agentos-...) - Copy the DNS name
{"status": "ok", "instantiated_at": "..."}
Next Steps
Configure Settings
Region, subnets, and ECR
Connect to AgentOS
Run your agents in the cloud
Verify Deployment
Confirm everything is working
Troubleshooting
'No basic auth credentials' error
'No basic auth credentials' error
ECR tokens expire after 12 hours. Re-run the authentication command:
RDS provisioning takes too long
RDS provisioning takes too long
RDS typically takes 5-10 minutes. Check status in RDS
Console → Databases. Look for the
database status to change from “Creating” to “Available”.
Can't find public subnets
Can't find public subnets
Public subnets have a route to an Internet Gateway. In the VPC Console: 1. Go
to Route Tables 2. Find tables with a route to
igw-xxx (Internet
Gateway) 3. Check which subnets are associated with those route tablesHealth check returns 502 Bad Gateway
Health check returns 502 Bad Gateway
The container may still be starting. Wait 2-3 minutes and retry.If it persists, check ECS task logs:
- Open ECS Console → Clusters →
my-agentos - Click on the running task
- Go to Logs tab to see container output
Task keeps stopping and restarting
Task keeps stopping and restarting
This usually indicates the container is crashing. Common causes:
- Missing environment variables (check your secrets files)
- Invalid API keys
- Database connection issues
