---
title: "Use Cloud Run or AWS Fargate when one host · Agent Wranglers"
url: https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/managed-containers
id: STK-108
level: Default
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1126
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Use Cloud Run or AWS Fargate when one host is not enough

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: STK-108
- Level: Default
- Chapter: [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md)
- Rule: When Compose on one host no longer carries the load, run the same images on Google Cloud Run or AWS Fargate. Keep the images free of anything only that service understands.
- Check: The same image digest runs in Compose on a developer machine and on the managed service. The service definition is in the infrastructure code, and no setting is typed into the cloud console.
- Review by: 2027-04-30
- Cost: Paid. Google and Amazon charge for the CPU and memory each container uses. Cloud Run has a monthly free allowance.
- How: No open source project runs your containers on someone else's machines, so a paid service is the realistic choice here. Judge it by the five tests and the exit test. AWS Fargate launched on 29 November 2017 and runs containers for Amazon ECS. Cloud Run became generally available on 14 November 2019. In the Stack Overflow Developer Survey 2025, AWS was the most used cloud platform at 43.3%, and Google Cloud third at 24.6%. Both run any standard OCI image that listens on a port, so leaving means pushing the image elsewhere. Build every environment from the same image, as [Build every environment from the same code](https://agentwranglers.se/playbook/infrastructure/environments/same-code-every-environment.md) says. Pick the service as [Choose the hosting model from written needs](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/hosting-model.md) describes. The limit for moving on to Kubernetes is in [Avoid Kubernetes until Compose and a managed container service fall short](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/avoid-early-kubernetes.md). Choose something else when your company already runs on Azure. Azure Container Apps does the same job there.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Shell example

```sh
gcloud run deploy shop --image ghcr.io/example/shop@sha256:0000000000000000000000000000000000000000000000000000000000000000 --region europe-north1
```

### Terraform example

```hcl
resource "aws_ecs_service" "shop" {
  name            = "shop"
  cluster         = aws_ecs_cluster.main.id
  task_definition = aws_ecs_task_definition.shop.arn
  launch_type     = "FARGATE"
  desired_count   = 2
}
```

## Sources

- [Cloud Run release notes](https://cloud.google.com/run/docs/release-notes)
- [AWS Fargate for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html)

## Related rules

- STK-100 [Avoid Kubernetes until Compose and a managed container service fall short](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/avoid-early-kubernetes.md) in Software choices
- INF-11 [Build every environment from the same code](https://agentwranglers.se/playbook/infrastructure/environments/same-code-every-environment.md) in Infrastructure and environments
- INF-61 [Choose the hosting model from written needs](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/hosting-model.md) in Infrastructure and environments

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/managed-containers">Agent Wranglers software choices playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Use Harbor or your code host's registry for container images](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/container-registry.md)
- Next: [Use Ubuntu LTS or Debian stable on servers](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/ubuntu-lts-or-debian.md)
- [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md)
