Ctrl Plane

AWS ECS/Fargate

Serverless container hosting on AWS using ECS and Fargate.

The AWS provider runs Ctrl Plane instances on Amazon ECS with Fargate, providing serverless container hosting without managing EC2 instances.

Status

Interface defined — the package structure exists at provider/aws and implements the provider.Provider interface. Full implementation is in progress.

Configuration

import "github.com/xraph/ctrlplane/provider/aws"

prov, err := aws.New(aws.Config{
    Region:     "us-east-1",
    Cluster:    "ctrlplane-prod",
    SubnetIDs:  []string{"subnet-abc", "subnet-def"},
    SecurityGroups: []string{"sg-123"},
    ExecutionRoleARN: "arn:aws:iam::123:role/ecsTaskExecution",
    TaskRoleARN: "arn:aws:iam::123:role/ecsTask",
})
FieldEnvDefaultDescription
RegionCP_AWS_REGIONAWS region
ClusterCP_AWS_ECS_CLUSTERECS cluster name or ARN
SubnetIDsCP_AWS_SUBNET_IDSVPC subnet IDs for tasks
SecurityGroupsCP_AWS_SECURITY_GROUPSSecurity group IDs
ExecutionRoleARNCP_AWS_EXEC_ROLE_ARNECS task execution IAM role
TaskRoleARNCP_AWS_TASK_ROLE_ARNIAM role for the running task

Capabilities

CapabilitySupported
provisionYes
deployYes
scaleYes
logsVia CloudWatch
execVia ECS Exec
rollingYes
autoscaleVia Application Auto Scaling
custom_domainsVia ALB + Route53
tlsVia ACM

Resource mapping

Ctrl Plane conceptAWS resource
InstanceECS Service + Task Definition
Environment variablesTask Definition environment
PortsTarget Group + ALB listener
Resources (CPU/Memory)Fargate task size
Custom domainsRoute53 record + ALB rule
TLS certificatesACM certificate
ScalingApplication Auto Scaling policy

How it works

  1. Provision creates an ECS Service with a Fargate task definition.
  2. Deploy registers a new task definition revision and updates the service.
  3. Scale updates the service desired count and task resource limits.
  4. Logs streams from CloudWatch Logs using the task log group.
  5. Exec uses ECS Exec to open a session to the running container.

When to use

  • Teams already on AWS infrastructure
  • Serverless container workloads without cluster management
  • Applications that need tight AWS service integration (RDS, SQS, S3)
  • Environments where managed auto-scaling is required

On this page