types-boto3-ecs

raw JSON →
1.43.0 verified Fri May 01 auth: no python

Type annotations for boto3 ECS 1.43.0 service, generated with mypy-boto3-builder 8.12.0. Provides static typing support for the Amazon Elastic Container Service (ECS) client and service resources. Version 1.43.0, maintained by youtype.

pip install types-boto3-ecs
error ModuleNotFoundError: No module named 'mypy_boto3_ecs'
cause Installed types-boto3-ecs but imports are from mypy_boto3_ecs. Package installs the mypy_boto3_ecs module; if your environment is not the same Python where you installed, it won't find it.
fix
Verify installation with: pip show types-boto3-ecs, and ensure the Python interpreter matches.
error ImportError: cannot import name 'ECSClient' from 'mypy_boto3_ecs'
cause Wrong import path (e.g., from mypy_boto3_ecs.client import ECSClient) or incomplete installation.
fix
Use: from mypy_boto3_ecs import ECSClient. Also ensure you have boto3 installed.
breaking Package renamed from boto3-stubs-ecs to types-boto3-ecs in June 2023. Old package no longer updated.
fix Uninstall old package: pip uninstall boto3-stubs-ecs; install new: pip install types-boto3-ecs.
gotcha Import path mismatch: the package name is types-boto3-ecs but imports use mypy_boto3_ecs. Do not try to import from types_boto3_ecs.
fix Always use: from mypy_boto3_ecs import ...
deprecated Python 3.8 support removed in mypy-boto3-builder 8.12.0. Requires Python >=3.9.
fix Upgrade to Python 3.9 or later.

Basic usage with type-annotated ECS client.

import boto3
from mypy_boto3_ecs import ECSClient

client: ECSClient = boto3.client("ecs", region_name="us-east-1")
clusters = client.list_clusters()
print(clusters["clusterArns"])