Registry / type-stubs / types-aiobotocore-ecs

types-aiobotocore-ecs

JSON →
library3.7.0pypypiunverified

types-aiobotocore-ecs provides comprehensive type annotations for the `aiobotocore` client for Amazon Elastic Container Service (ECS). It enhances developer experience by enabling static type checking with tools like MyPy, catching potential errors at compile time rather than runtime. This library is part of the `types-aiobotocore` family, which offers stubs for all AWS services, and is frequently updated to align with the latest `aiobotocore` and AWS API changes.

pip install types-aiobotocore-ecs aiobotocore
INSTALL
IMPORT
SIG · TYPES-AIOBOTOCORE-
T
types-aiobotocore-ecs
type-stubspythonv3.7.0
Install
6.1s avg
Import
1146ms
Disk
60MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 1.203s · 60.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 6.1s · import 1.089s · 62MB
60MB installed
● package 60MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ECSClient
from types_aiobotocore_ecs import ECSClient
from aiobotocore.client import Client
The runtime client from `aiobotocore` will be `Any` without explicit type hinting with `types_aiobotocore_ecs.ECSClient`.
ListClustersResponseTypeDef
from types_aiobotocore_ecs.type_defs import ListClustersResponseTypeDef
from types_aiobotocore_ecs import ListClustersResponseTypeDef
While some TypeDefs might be directly accessible, it's safer and clearer to import them from the `type_defs` submodule.

This quickstart demonstrates how to use `types-aiobotocore-ecs` to get a type-hinted ECS client. It initializes an `aiobotocore` session, creates an ECS client, and then calls `list_clusters` with full type safety, showing how to access the response attributes.

import asyncio import aiobotocore.session from types_aiobotocore_ecs import ECSClient, ListClustersResponseTypeDef async def main(): session = aiobotocore.session.get_session() # Replace 'us-east-1' with your desired AWS region async with session.create_client("ecs", region_name="us-east-1") as client: client: ECSClient # Type hint the client for MyPy print("Listing ECS clusters...") # The response is type-hinted for static analysis response: ListClustersResponseTypeDef = await client.list_clusters() cluster_arns = response.get("clusterArns", []) if cluster_arns: print(f"Found {len(cluster_arns)} clusters:") for arn in cluster_arns: print(f"- {arn}") else: print("No ECS clusters found.") if __name__ == "__main__": asyncio.run(main())
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` 8.12.0, which generates these type stubs. This library (types-aiobotocore-ecs 3.4.0) explicitly requires Python >=3.9.
fix
Upgrade your Python environment to 3.9 or higher.
affects: >=3.4.0 (for types-aiobotocore-ecs) and builder >=8.12.0
breakingTypeDef naming conventions changed significantly in `mypy-boto3-builder` 8.9.0. Explicitly imported TypeDefs (e.g., `CreateDistributionRequestRequestTypeDef` becoming `CreateDistributionRequestTypeDef`) might have different names.
fix
Review your explicit TypeDef imports and update their names according to the new convention (typically shorter, or 'Extra' moved to the end if applicable).
affects: Builder >=8.9.0, impacting `types-aiobotocore-*` packages generated with it.
gotcha`types-aiobotocore-ecs` provides *only* type stubs. You must also install `aiobotocore` (and potentially `aiobotocore[boto3]` or `aioboto3`) for the actual runtime functionality.
fix
Ensure both `types-aiobotocore-ecs` and `aiobotocore` are installed (e.g., `pip install types-aiobotocore-ecs aiobotocore`).
affects: All versions
gotchaFor correct type checking, the version of `types-aiobotocore-ecs` should ideally match the major/minor version of your installed `aiobotocore` to ensure API compatibility. Mismatches can lead to incorrect type hints or missing attributes.
fix
Keep `types-aiobotocore-ecs` and `aiobotocore` updated, or ensure their versions are compatible. The `types-aiobotocore-ecs` version (e.g., `3.4.0`) is typically derived from `aiobotocore`'s major.minor version (e.g., `2.13.0` -> `types-aiobotocore-2.13.0.post*`).
affects: All versions
Upgrade
Version history
3.7.0latest on PyPI · released May 10, 2026
Audit
Dependencies
aiobotocorerequiredProvides the actual runtime AWS client; types-aiobotocore-ecs only provides type stubs.
typing-extensionsoptionalRequired for backporting newer `typing` features on Python versions older than 3.9 (though types-aiobotocore-ecs now requires Python 3.9+).
Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
2
Resources
types-aiobotocore-ecs — pip install types-aiobotocore-ecs · libregistry