types-boto3-ssm
raw JSON → 1.43.0 verified Fri May 01 auth: no python
Type annotations for boto3 SSM (Simple Systems Manager) service, generated by mypy-boto3-builder. Provides static type checking and IDE autocompletion for boto3 SSM client and resources. Current version is 1.43.0, following boto3 SSM API version 1.43.0. Release cadence matches boto3 service updates. Requires Python >=3.9.
pip install types-boto3-ssm Common errors
error ModuleNotFoundError: No module named 'types_boto3_ssm' ↓
cause Trying to import 'types_boto3_ssm' instead of 'mypy_boto3_ssm'.
fix
Use 'import mypy_boto3_ssm' or 'from mypy_boto3_ssm import SSMClient'.
error ImportError: cannot import name 'SSMClient' from 'boto3' ↓
cause SSMClient type stub is not part of boto3; it's in the types package.
fix
Install types-boto3-ssm and import from mypy_boto3_ssm: 'from mypy_boto3_ssm import SSMClient'.
error AttributeError: module 'mypy_boto3_ssm' has no attribute 'SSMClient' ↓
cause Maybe you installed an older version where the client class had a different name or wasn't exported.
fix
Check installed version: pip show types-boto3-ssm. Update to latest: pip install -U types-boto3-ssm. Alternatively, import from submodule: 'from mypy_boto3_ssm.client import SSMClient'.
error Name 'SSMClient' is not defined (mypy error) ↓
cause mypy cannot find the type stub. Probably the types package is not installed or not in type-checking path.
fix
Install types-boto3-ssm and ensure mypy can see it: 'pip install types-boto3-ssm'. If using mypy, add '--ignore-missing-imports' or configure MYPYPATH.
Warnings
breaking Version 8.9.0 introduced breaking changes: TypeDef names for packed arguments were shortened and conflicting TypeDefs had 'Extra' postfix moved to end. If you import specific TypeDefs, update your imports. ↓
fix Update imports: e.g., 'CreateDistributionRequestRequestTypeDef' becomes 'CreateDistributionRequestTypeDef' for non-conflicting names. For conflicting names, 'CreateDistributionExtraRequestTypeDef' becomes 'CreateDistributionRequestExtraTypeDef'.
gotcha Do not import from 'types_boto3_ssm' directly. The package installs as 'types-boto3-ssm' but the Python module is 'mypy_boto3_ssm'. ↓
fix Use 'import mypy_boto3_ssm' or 'from mypy_boto3_ssm import SSMClient'.
gotcha The type stubs are designed for static type checkers like mypy or pyright. They do not add runtime behavior. If you use them at runtime (e.g., isinstance checks), you may encounter errors because these classes don't exist at runtime. ↓
fix Use only for type hints. For runtime checks, use boto3's native types or typeguard.
deprecated Support for Python 3.8 was removed in version 8.12.0. If you need Python 3.8 support, pin to versions <8.12.0. ↓
fix Use Python >=3.9 or install an older version: pip install 'types-boto3-ssm<8.12.0'.
gotcha The package version number (e.g., 1.43.0) corresponds to the boto3 SSM API version, not the mypy-boto3-builder version. Do not confuse with builder versions like 8.12.0. ↓
fix Check the actual API version by inspecting the package's version or the boto3 SSM changelog.
Install
pip install 'types-boto3-ssm[doc]' Imports
- SSMClient wrong
from types_boto3_ssm import SSMClientcorrectfrom mypy_boto3_ssm.client import SSMClient - SSMServiceResource wrong
from boto3.ssm import SSMServiceResourcecorrectfrom mypy_boto3_ssm.service_resource import SSMServiceResource - Paginator wrong
from boto3.ssm.paginator import DescribeInstanceInformationPaginatorcorrectfrom mypy_boto3_ssm.paginator import DescribeInstanceInformationPaginator - ServiceResource
from mypy_boto3_ssm.service_resource import ServiceResource as SSMServiceResource - SSMClient
from mypy_boto3_ssm import SSMClient
Quickstart
import boto3
from mypy_boto3_ssm import SSMClient
client: SSMClient = boto3.client('ssm', region_name='us-east-1')
response = client.describe_parameters(MaxResults=10)
for param in response['Parameters']:
print(param['Name'])