Install & Compatibility
Where this runs
tested against v3.9.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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.0s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
KMSClient
✓ from types_aiobotocore_kms import KMSClient
✗ from types_aiobotocore_kms import KMSClient
This example demonstrates how to use the `KMSClient` from `types-aiobotocore-kms` with `aiobotocore` to describe a KMS key, leveraging type hints for better code completion and error checking. It includes basic setup for an asynchronous client session.
import asyncio
import os
from aiobotocore.session import get_session
from types_aiobotocore_kms.client import KMSClient
async def describe_key_example():
session = get_session()
async with session.create_client(
"kms",
region_name=os.environ.get('AWS_REGION', 'us-east-1'),
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'test'),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'test'),
aws_session_token=os.environ.get('AWS_SESSION_TOKEN', None),
) as client: # type: KMSClient
# Replace with a valid KMS Key ID or ARN for real usage
key_id = "arn:aws:kms:us-east-1:123456789012:key/your-key-id" # Placeholder
try:
response = await client.describe_key(KeyId=key_id)
print(f"Key description: {response.get('KeyMetadata', {})}")
except Exception as e:
print(f"Error describing key {key_id}: {e}")
if __name__ == "__main__":
# Ensure AWS credentials and region are set in environment variables
# or configure aiobotocore session appropriately.
# For this example, placeholders are used, but for real AWS interaction,
# valid credentials and a valid KeyId are required.
asyncio.run(describe_key_example())
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, which affects `types-aiobotocore-kms`. Projects requiring Python 3.8 must use an older version of the stubs or upgrade their Python interpreter.fixUpgrade Python to 3.9 or newer. If stuck on Python 3.8, pin `types-aiobotocore-kms` to an older version compatible with `mypy-boto3-builder < 8.12.0`.
affects: >=8.12.0 of mypy-boto3-builder (used to generate types-aiobotocore-kms)
breakingIn `mypy-boto3-builder` version 8.9.0, `TypeDef` naming conventions changed. Argument `TypeDefs` use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes moved (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`). This is a breaking change for code explicitly referencing these `TypeDef` names.fixUpdate `TypeDef` references in your code to match the new naming conventions.
affects: >=8.9.0 of mypy-boto3-builder
gotchaThe `types-aiobotocore-kms` package version is tied to the `aiobotocore` version it provides stubs for. Mismatches between the installed stub package and the runtime `aiobotocore` version can lead to type checking errors or missing types, as method signatures or available operations might differ.fixEnsure that the installed `types-aiobotocore-kms` package version is compatible with your `aiobotocore` runtime version. Ideally, keep them in sync.
affects: All versions
gotchaDue to known performance issues in PyCharm with `Literal` overloads (issue PY-40997), it is recommended to use `types-aiobotocore-lite` for better IDE performance if you experience slowness or high CPU usage with PyCharm's type checker.fixConsider installing `types-aiobotocore-lite[kms]` instead of `types-aiobotocore-kms` (or `types-aiobotocore[kms]`) to alleviate performance issues in PyCharm, or disable PyCharm's internal type checker and use `mypy` or `pyright`.
affects: All versions, specifically when used with PyCharm
gotchaAs of `mypy-boto3-builder` 8.12.0, all packages migrated to PEP 561. This generally improves type checker compatibility but might require re-evaluation of import paths or stub discovery configurations in complex or highly customized type-checking setups.fixVerify that your type checker (e.g., mypy, pyright) correctly discovers the stubs after upgrading. Adjust `mypy_path` or `pyrightconfig.json` if necessary.
affects: >=8.12.0 of mypy-boto3-builder
Upgrade
Version history
3.9.0latest on PyPI · released Aug 2, 2026
Audit
Dependencies
aiobotocoreoptionalProvides the underlying asynchronous AWS client library for which these are type stubs.
PythonrequiredRequires Python 3.9 or newer.