Registry / type-stubs / types-boto3-iam

types-boto3-iam

JSON →
library1.43.70pypypi✓ verified 23d ago

types-boto3-iam provides comprehensive type annotations for the AWS Identity and Access Management (IAM) service client within the `boto3` library. This package is generated by `mypy-boto3-builder` and aims to enhance static analysis, autocompletion, and error detection in IDEs and linters like MyPy and Pyright, ensuring type safety for `boto3` IAM operations. It is actively maintained with frequent updates reflecting `boto3` versions.

pip install types-boto3-iam
INSTALL
IMPORT
SIG · TYPES-BOTO3-IAM
T
types-boto3-iam
type-stubspythonv1.43.70
Install
3.2s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.70 · 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 0.000s · 21MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.2s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

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

IAMClient
from types_boto3_iam import IAMClient
from types_boto3_iam import IAMClient

This quickstart demonstrates how to initialize an IAM client with type annotations using `types-boto3-iam`. The `IAMClient` type ensures that `iam_client` methods and their arguments/return values are checked by your static type checker, providing autocompletion and early error detection.

import boto3 from boto3.session import Session from types_boto3_iam import IAMClient # Instantiate a boto3 session and client session: Session = boto3.session.Session() iam_client: IAMClient = session.client("iam") # Example usage with type-hinted client # (Note: In a real scenario, use proper error handling and credential management) try: response = iam_client.list_users(MaxItems=1) for user in response.get('Users', []): print(f"IAM User: {user['UserName']} (ARN: {user['Arn']})") except Exception as e: print(f"Error listing users: {e}")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0 (which generates these stubs), Python 3.8 is no longer supported. Users on Python 3.8 should upgrade their Python version or use an older stub version.
fix
Upgrade to Python 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0 (and generated types-boto3-iam versions)
breakingVersion 8.9.0 of `mypy-boto3-builder` introduced breaking changes in TypeDef naming conventions, potentially affecting explicit imports of generated type definitions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`).
fix
Review explicit TypeDef imports and update names according to the new conventions.
affects: mypy-boto3-builder >=8.9.0 (and generated types-boto3-iam versions)
gotchaThese are separate stub packages; `boto3` itself does not include these type annotations. You must install `types-boto3-iam` alongside `boto3` for type checking to function correctly.
fix
Ensure `types-boto3-iam` is installed in your development environment when `boto3` is used.
affects: All versions
gotchaWhen using Pylint, it might complain about undefined variables if types-boto3-iam is imported only for type checking. A common workaround is to use a `if TYPE_CHECKING:` guard.
fix
Wrap type-only imports with `from typing import TYPE_CHECKING; if TYPE_CHECKING: ...` to avoid Pylint warnings in runtime environments.
affects: All versions
gotchaPyCharm users might experience slow performance with Literal overloads. For better IDE performance, consider using `types-boto3-lite` variants (e.g., `types-boto3-lite-iam`) if explicit type annotations are acceptable.
fix
Install `types-boto3-lite-iam` or `types-boto3-lite[iam]` instead of the full package, and use explicit type hints where auto-discovery causes performance issues.
affects: All versions
Upgrade
Version history
1.43.70latest on PyPI · released Aug 12, 2026
Audit
Dependencies
boto3requiredProvides the runtime functionality that these types annotate. This stub package does not install boto3 itself.
pythonrequiredRequires Python 3.9 or higher.
Agent activity
44 hits · last 30 days
node
36
OpenAI (training)
1
Resources
types-boto3-iam — pip install types-boto3-iam · libregistry