DocsAWS 101BlogServices

ECS

Clusters, task definitions, services, tasks — tasks run as real Docker containers on the host daemon.

Query (Action parameter) multi-tenant 49 operations

Quick start

import boto3
ecs = boto3.client("ecs", endpoint_url="http://localhost:4566",
                   region_name="us-east-1",
                   aws_access_key_id="test", aws_secret_access_key="test")
ecs.create_cluster(clusterName="c")
td = ecs.register_task_definition(family="hello", containerDefinitions=[
    {"name":"h","image":"hello-world","essential":True}])
ecs.run_task(cluster="c", taskDefinition=td["taskDefinition"]["taskDefinitionArn"])

Supported operations

49 operations exposed by this service as of MiniStack 1.3.14. Extracted directly from the handler dispatch in the source module.

CreateCapacityProvider CreateCluster CreateService DeleteAccountSetting DeleteAttributes DeleteCapacityProvider DeleteCluster DeleteService DeleteTaskDefinitions DeregisterTaskDefinition DescribeCapacityProviders DescribeClusters DescribeContainerInstances DescribeServiceDeployments DescribeServiceRevisions DescribeServices DescribeTaskDefinition DescribeTasks DiscoverPollEndpoint ExecuteCommand GetTaskProtection ListAccountSettings ListAttributes ListClusters ListContainerInstances ListServiceDeployments ListServices ListServicesByNamespace ListTagsForResource ListTaskDefinitionFamilies ListTaskDefinitions ListTasks PutAccountSetting PutAccountSettingDefault PutAttributes PutClusterCapacityProviders RegisterTaskDefinition RunTask StopTask SubmitAttachmentStateChanges SubmitContainerStateChange SubmitTaskStateChange TagResource UntagResource UpdateCapacityProvider UpdateCluster UpdateClusterSettings UpdateService UpdateTaskProtection

CloudFormation

The CloudFormation engine provisions these resource types via this service:

AWS::ECS::Cluster AWS::ECS::TaskDefinition AWS::ECS::Service

See CloudFormation engine for intrinsic support and lifecycle details.

Known limitations

  • awslogs driver configuration is parsed but stdout/stderr is NOT written to CloudWatch Logs.
  • SubmitTaskStateChange does not emit to EventBridge.
  • Task reaping interval: ECS_REAP_INTERVAL_SECONDS (default 60s).

Source

  • ministack/services/ecs.py:1613-1673

Read the source to verify the ops list above — dispatch tables and handler functions are the ground truth.