From baaf27513a63746fdd82466a9c6e4b68170ef215 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 12 Jan 2026 13:09:56 +0100 Subject: [PATCH] chore(kb/aws/ecs): improve notes on launch type and capacity providers --- knowledge base/cloud computing/aws/ecs.md | 35 +++++++++++++++++------ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/knowledge base/cloud computing/aws/ecs.md b/knowledge base/cloud computing/aws/ecs.md index 044bd6d..638854b 100644 --- a/knowledge base/cloud computing/aws/ecs.md +++ b/knowledge base/cloud computing/aws/ecs.md @@ -10,6 +10,7 @@ 1. [Fargate launch type](#fargate-launch-type) 1. [External launch type](#external-launch-type) 1. [Capacity providers](#capacity-providers) + 1. [Capacity provider strategies](#capacity-provider-strategies) 1. [EC2 capacity providers](#ec2-capacity-providers) 1. [Fargate for ECS](#fargate-for-ecs) 1. [Resource constraints](#resource-constraints) @@ -348,6 +349,17 @@ Available service scheduler strategies: Defines the underlying infrastructure effectively running containers within ECS. +```json +{ + "serviceName": "some-ecs-service", + … , + "launchType": "FARGATE" +} +``` + +The setting is currently **mutually exclusive** with [capacity provider strategies].
+Prefer using those to leverage enhanced flexibility and advanced features for capacity management. + ### EC2 launch type Starts tasks onto _registered_ EC2 instances. @@ -374,12 +386,16 @@ deployments. Refer [Capacity providers][upstream capacity providers]. Clusters can contain a mix of tasks that are hosted on Fargate, Amazon EC2 instances, or external instances.
-Tasks can run on Fargate or EC2 infrastructure as a launch type or a capacity provider strategy.
-Capacity providers manage the scaling of infrastructure for tasks in one's clusters. +Tasks can run on Fargate or EC2 infrastructure, as defined by their [launch type] or a capacity provider strategy.
+Capacity providers offer enhanced flexibility and advanced features for capacity management compared to launch types. Each cluster can have one or more _capacity providers_, and an optional _capacity provider strategy_. -The capacity provider strategy determines how tasks are spread across a cluster's capacity providers.
+### Capacity provider strategies + +Capacity provider strategies determine how tasks are spread across a cluster's capacity providers.
+Cluster that do **not** have a default capacity provider strategy will spread tasks **wherever** they find enough +capacity.
One can assign a **default** capacity provider strategy to a cluster.
@@ -406,11 +422,13 @@ One can assign a **default** capacity provider strategy to a cluster.
-When running a standalone task or creating a service, one can either use the cluster's default capacity provider -strategy or provide one that overrides the default.
-The default capacity provider strategy **only** applies when one does **not** specify a launch type **nor** a capacity -provider strategy for a task or service. If either of these parameters is provided, the cluster's default strategy is -ignored. +When running a standalone task or creating a service, one _can_ specify a capacity provider strategy to override the +cluster's default one. + +> [!important] +> The default capacity provider strategy **only** applies when one specifies **neither** a launch type **nor** a +> capacity provider strategy for a task or service.
+> Should **any** of these parameters be provided, the cluster's default strategy will be **ignored**.
Override the cluster's default strategy @@ -1820,6 +1838,7 @@ Specify a supported value for the task CPU and memory in your task definition. [Scale the number of tasks automatically]: #scale-the-number-of-tasks-automatically [services]: #services [standalone tasks]: #standalone-tasks +[capacity provider strategies]: #capacity-provider-strategies [amazon web services]: README.md