AWS Provider
Agent Cloud supports deploying to three AWS services depending on your project type. This guide covers the setup required and what each deployment target looks like.
Prerequisites
Section titled “Prerequisites”Install AWS CLI v2
Section titled “Install AWS CLI v2”# macOSbrew install awscli
# Linuxcurl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zipsudo ./aws/install
# Windows# Download from https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.htmlConfigure Credentials
Section titled “Configure Credentials”aws configureYou will be prompted for:
- AWS Access Key ID — from your IAM user
- AWS Secret Access Key — from your IAM user
- Default region — e.g.
us-east-1 - Default output format —
jsonrecommended
Verify Setup
Section titled “Verify Setup”# Check CLI versionaws --version
# Verify authenticationaws sts get-caller-identityYou can also use Agent Cloud to verify:
cloud-agent status --cloud awsIAM Permissions Required
Section titled “IAM Permissions Required”The IAM user or role you authenticate with needs the following permissions. You can attach the AWS managed policies listed below, or create a custom policy.
For ECS Fargate Deployments
Section titled “For ECS Fargate Deployments”Required managed policies:
AmazonECS_FullAccessAmazonEC2ContainerRegistryFullAccessElasticLoadBalancingFullAccessCloudWatchLogsFullAccess
Or a custom policy covering:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ecr:CreateRepository", "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload", "ecs:CreateCluster", "ecs:RegisterTaskDefinition", "ecs:CreateService", "ecs:UpdateService", "ecs:DescribeServices", "ecs:DescribeClusters", "elasticloadbalancing:*", "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "iam:PassRole" ], "Resource": "*" } ]}For Lambda Deployments
Section titled “For Lambda Deployments”AWSLambda_FullAccessIAMFullAccess(for creating execution roles)
For S3 Static Site Deployments
Section titled “For S3 Static Site Deployments”AmazonS3FullAccessCloudFrontFullAccess(optional, for CDN)
Deployment Targets
Section titled “Deployment Targets”ECS Fargate (APIs and Web Apps)
Section titled “ECS Fargate (APIs and Web Apps)”Used for: Express, NestJS, FastAPI, Next.js, and any containerized application.
Agent Cloud will:
- Create an ECR (Elastic Container Registry) repository
- Build a Docker image from your project (generates a Dockerfile if needed)
- Push the image to ECR
- Create an ECS cluster
- Register a task definition with your container configuration
- Create an ECS service with the desired number of tasks
- Set up an Application Load Balancer for HTTP traffic
What you get:
- A running container accessible via a load balancer URL
- Automatic restarts if the container crashes
- CloudWatch Logs for monitoring
Estimated cost: $30-60/month for a small service (256 CPU, 512MB memory).
Lambda (Serverless Functions)
Section titled “Lambda (Serverless Functions)”Used for: Lightweight APIs, event handlers, and scheduled tasks.
Agent Cloud will:
- Package your code into a deployment bundle
- Create a Lambda function with the appropriate runtime
- Configure memory and timeout settings
- Set up an API Gateway trigger for HTTP endpoints
What you get:
- Pay-per-invocation pricing (free tier: 1M requests/month)
- Automatic scaling to zero
- No server management
Estimated cost: $0-10/month for low-traffic services.
S3 Static Site (Static Sites)
Section titled “S3 Static Site (Static Sites)”Used for: HTML/CSS/JS sites, React SPAs, Astro, Gatsby, and other static builds.
Agent Cloud will:
- Create an S3 bucket configured for static website hosting
- Set the bucket policy for public read access
- Upload your build output (e.g.,
dist/orbuild/) - Optionally create a CloudFront distribution for CDN
What you get:
- Globally accessible static website
- Near-zero hosting cost
- Optional CloudFront CDN for lower latency
Estimated cost: $1-5/month for typical static sites.
How Agent Cloud Chooses
Section titled “How Agent Cloud Chooses”The analyzer agent detects your project type and maps it to AWS services:
| Project Type | Primary Service | Fallback |
|---|---|---|
| API (Node.js, Python, Go) | ECS Fargate | Lambda |
| Web App (Next.js, React SSR) | ECS Fargate | Amplify |
| Static Site (HTML, SPA) | S3 + CloudFront | Amplify |
| Container (Dockerfile) | ECS Fargate | — |
Cleanup
Section titled “Cleanup”To remove resources created by Agent Cloud:
cloud-agent cleanup --cloud awsThis deletes ECS services, clusters, ECR repositories, S3 buckets, and associated resources that were created during deployment.
Troubleshooting
Section titled “Troubleshooting”“Unable to locate credentials” — Run aws configure or check that AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set in your environment.
“AccessDeniedException” — Your IAM user lacks the required permissions. See the IAM section above.
“No Docker daemon” — ECS deployments require Docker to build images. Make sure Docker Desktop or Docker Engine is running.
“Rate exceeded” — AWS API rate limits. Wait a moment and try again, or request a limit increase.