Docs
relyance.ai ↗
Browse docs

Deploy Outpost on Amazon ECS with Fargate

Updated November 23, 2026View as Markdown ↗

Outpost runs inventory and data inspection tasks in your AWS account. This guide uses AWS Fargate for the scan workers and Outpost ECS module version 0.2.0. Relyance works with you to register the deployment, provide the exact image references, and verify the first scan.

Before you start

  • Use Terraform 1.11 or later and AWS provider 6.71 or later within the 6.x series. Confirm the deployment account, region, VPC, and private subnets with Relyance.
  • Reserve Linux x86-64 Fargate capacity. Check the CPU, memory, and ephemeral storage in the supplied task configuration against Fargate limits and your regional quota. Ephemeral storage must fit the container images as well as scan scratch space.
  • Plan private task networking and outbound access to the configured container registry, Secrets Manager, CloudWatch Logs, the approved S3 locations, the Relyance API and queue endpoints, and the data sources in scope. Confirm DNS and TLS from the selected subnets.
  • Agree on the AWS Secrets Manager references for Outpost BYOK and the S3 output locations and reader role that Relyance will register. Share resource references through your onboarding channel and store credential values in Secrets Manager.

Choose a Redis backend

Choose the backend when you provision the installation. Backend changes require a separate migration plan for queued work.

Backend When to choose it What you supply
Amazon ElastiCache Use the default managed backend with a primary and replica, Multi-AZ failover, TLS, encryption at rest, and snapshots. Leave ecs_redis unset. Supply separate Secrets Manager credentials for workers and the read-only metrics exporter.
Redis on ECS Run a single Redis task on Fargate. The task keeps its append-only file on encrypted Amazon EFS so queued work can survive task replacement. Redis is briefly unavailable during replacement. Supply ecs_redis with the approved immutable Redis image, private DNS namespace, and TLS certificate secret. Use separate Secrets Manager credentials for workers and the exporter.

For ECS Redis, use an approved private ECR mirror. The certificate must cover redis.<dns_namespace> and be trusted by the released runtime. Use the versioned Redis settings for the required image tools, secret structure, and VPC endpoint access.

Provision the ECS services with scan activation held

  1. Start with the Fargate example for 0.2.0. For a standalone copy, set the ECS module source to Relyance/outpost-ecs/aws and its version to 0.2.0. Keep the explicit aws and aws.secrets provider mappings.

  2. Set installation_facts_path to the installation JSON from your Relyance onboarding. It supplies the Fargate capacity provider for each enabled worker, deployment identity, queue settings, and digest-pinned images. Enter your VPC, subnet, and secret references in the root's variables. If you use an existing ECS cluster, set create_cluster = false and confirm the cluster owner has associated FARGATE.

  3. Keep activated = false. If you choose ECS Redis, provision with ecs_redis.start = false as well. Initialize Terraform, validate the configuration, and review the planned resources and permissions before applying.

    terraform init
    terraform validate
    terraform plan -out=outpost-ecs.tfplan
    terraform apply outpost-ecs.tfplan
  4. Give Relyance the task_execution_role_arn module output for registry onboarding and the output-reader role ARN for hosted transfer. The ECS task execution role pulls images. Task roles authorize the running workers to access queues, secrets, and approved storage. For ECS Redis, also check the registry access for the separate ecs_redis_execution_role_arn.

Verify image pulls and Redis before activation

Use the image-pull check agreed with Relyance in the actual private subnets with the new task execution role and pinned images. Supply the AWS region, cluster, and resulting task ARN from that check.

aws ecs describe-tasks --region "$AWS_REGION" --cluster "$ECS_CLUSTER" \
  --tasks "$PULL_TEST_TASK_ARN" \
  --query 'tasks[].{PullStarted:pullStartedAt,PullStopped:pullStoppedAt,StoppedReason:stoppedReason,Containers:containers[].{Name:name,Digest:imageDigest,Reason:reason}}'

Confirm that the pull finished, that the running container images resolve to the expected Linux x86-64 manifest digests, and that ECS reports no image-pull or initialization errors. If a pull fails, check the execution role's registry access and the subnet's route or endpoints to the registry and its image layers.

For ElastiCache, check TLS connectivity and each role's Redis authentication from the private task network. For ECS Redis, set ecs_redis.start = true and apply a reviewed plan while scan activation stays held. Wait for the Redis task to become healthy, verify its pinned image and EFS mount, then check TLS connectivity and authentication with the worker and exporter credentials. Keep the worker and exporter permissions separate.

Activate and verify the first scan

After Relyance confirms the deployment registration, queue permissions, and hosted output reader, review and apply the plan with activated = true. Set up the agreed Outpost connection in Relyance and start a small scan of a known source.

  1. In ECS, verify that queued work starts the expected worker services and that the workers reach the source and complete their tasks.
  2. Check that inventory and findings for that scan appear in the approved S3 locations. Confirm with Relyance that the hosted copy succeeds for the same scan and that the results appear in the application.
  3. After the work has settled, verify that the scan workers return to zero. ECS Application Auto Scaling manages the worker counts. The metrics exporter and your selected Redis backend remain available to support the next scan.

For the broader architecture and operating model, see the Outpost FAQ.