Terraform
Deploy Strands Decider with Terraform if you’d rather not run CDK, or you need the same recipe across different cloud providers or on-prem. There is no SDK module yet — this page shows the shape so you can wire your own.
Decider serves plain HTTP (strands-decider serve), so the Terraform shape
is the usual one: build a container image, push it to a registry, and point
your compute at it.
- When to pick it: you already use Terraform for your stack; you want the same deploy against more than one cloud provider; you need to layer Decider into existing VPCs, IAM, or networking you control with Terraform.
Container image
Section titled “Container image”Decider is a pip install plus strands-decider serve; package that into a
container and push it to your cloud provider’s container registry:
FROM python:3.12-slimRUN pip install --no-cache-dir strands-deciderEXPOSE 8000CMD ["strands-decider", "serve", \ "StrandsAgents/strands-decider-E2B-gemma4-v1-2610", \ "--port", "8000"]Build --platform linux/amd64 for most cloud hosts; use a GPU-capable base
and host for the Gemma 4 12B / 26B-A4B models
(designs/inference).
AWS ECS / Fargate
Section titled “AWS ECS / Fargate”The most portable Terraform target: ECS with a Fargate task running the container, fronted by a public ALB.
terraform { required_providers { aws = { source = "hashicorp/aws", version = "~> 5.0" } }}
provider "aws" { region = var.aws_region}
resource "aws_ecs_cluster" "decider" { name = "strands-decider"}
resource "aws_cloudwatch_log_group" "decider" { name = "/ecs/strands-decider" retention_in_days = 7}
resource "aws_ecs_task_definition" "decider" { family = "strands-decider" requires_compatibilities = ["FARGATE"] network_mode = "awsvpc" cpu = "2048" memory = "8192" execution_role_arn = aws_iam_role.ecs_execution.arn
container_definitions = jsonencode([{ name = "decider" image = var.decider_image portMappings = [{ containerPort = 8000, hostPort = 8000 }] logConfiguration = { logDriver = "awslogs" options = { awslogs-group = aws_cloudwatch_log_group.decider.name awslogs-region = var.aws_region awslogs-stream-prefix = "decider" } } }])}
resource "aws_ecs_service" "decider" { name = "strands-decider" cluster = aws_ecs_cluster.decider.id task_definition = aws_ecs_task_definition.decider.arn launch_type = "FARGATE" desired_count = 1
network_configuration { subnets = var.subnet_ids security_groups = [aws_security_group.decider.id] assign_public_ip = true }}Wire an ALB target group at port 8000 for public access, or front it with
API Gateway + a VPC Link if you want IAM-authenticated requests. Hit
POST /v1/systemone once the service is healthy — same request shape as
Local.
Variables
Section titled “Variables”| Variable | Purpose |
|---|---|
decider_image | The image URI in ECR (or a public registry) |
aws_region | The region to deploy into |
subnet_ids | Subnets for the Fargate task (two in different AZs for the ALB) |
Other targets
Section titled “Other targets”Same pattern, different resources — pick the module that matches your cloud provider:
- Serverless container service — a single resource per provider
(
google_cloud_run_v2_service,azurerm_container_app, etc.); set a minimum instance count to keep a warm replica, or let it scale to zero for bursty traffic. - Managed Kubernetes —
kubernetes_deployment+kubernetes_servicewith a GPU node pool for the larger models. - Bare metal — any Linux VM; a
null_resourcewith aremote-execprovisioner to runstrands-decider serveunder systemd works.
Deploy
Section titled “Deploy”terraform initterraform planterraform applyRebuild the image and re-apply when the Decider version you serve changes.
terraform destroy removes the stack.
Additional resources
Section titled “Additional resources”- Strands Docker Deploy Documentation
- Terraform Documentation
- Terraform AWS Provider
- Terraform Google Provider
- Terraform Azure Provider
See also
Section titled “See also”- Full core-site guide (general Strands agents, more targets): Deploy with Terraform
- No SDK Terraform module yet — the strands-decider repo ships CDK stacks for SageMaker and Lambda. PRs welcome at github.com/strands-labs/strands-decider.