{"id":7818,"library":"types-aiobotocore-ssm","title":"Type annotations for aiobotocore SSM","description":"types-aiobotocore-ssm provides comprehensive type annotations for the `aiobotocore` SSM (Systems Manager) service, enhancing static type checking with tools like MyPy. It is generated by `mypy-boto3-builder` (version 8.12.0 for the current 3.4.0 release of the stubs) and receives frequent updates, typically in sync with `aiobotocore` releases and `mypy-boto3-builder` enhancements.","status":"active","version":"3.4.0","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["typing","mypy","boto3","aws","aiobotocore","ssm","type hints","static analysis"],"install":[{"cmd":"pip install types-aiobotocore-ssm aiobotocore","lang":"bash","label":"Install with runtime dependency"},{"cmd":"pip install 'types-aiobotocore[ssm]' aiobotocore","lang":"bash","label":"Install as part of types-aiobotocore bundle"}],"dependencies":[{"reason":"Runtime library for AWS SDK functionality. `types-aiobotocore-ssm` only provides type stubs.","package":"aiobotocore","optional":false},{"reason":"Requires Python 3.9 or newer due to removal of Python 3.8 support in mypy-boto3-builder 8.12.0.","package":"python","optional":false}],"imports":[{"note":"Main client type for SSM service operations.","symbol":"SSMClient","correct":"from types_aiobotocore_ssm.client import SSMClient"},{"note":"Type annotation for the `CommandExecuted` waiter.","symbol":"CommandExecutedWaiter","correct":"from types_aiobotocore_ssm.waiter import CommandExecutedWaiter"},{"note":"Example of importing a generated TypedDict for request/response structures.","symbol":"AccountSharingInfoTypeDef","correct":"from types_aiobotocore_ssm.type_defs import AccountSharingInfoTypeDef"},{"note":"Example of importing a literal type for static checking.","symbol":"AccessRequestStatusType","correct":"from types_aiobotocore_ssm.literals import AccessRequestStatusType"}],"quickstart":{"code":"import asyncio\nfrom aiobotocore.session import get_session\nfrom types_aiobotocore_ssm.client import SSMClient\nfrom types_aiobotocore_ssm.waiter import CommandExecutedWaiter\n\nasync def describe_instance_information():\n    session = get_session()\n    async with session.create_client(\"ssm\") as client: # type: SSMClient\n        # Use explicit type annotation for client for clarity, though often inferred\n        print(\"Describing instance information...\")\n        response = await client.describe_instance_information(\n            MaxResults=5\n        )\n        print(f\"Instances: {[instance['InstanceId'] for instance in response.get('InstanceInformationList', [])]}\")\n\n        # Example of using a waiter\n        print(\"Getting CommandExecuted waiter...\")\n        waiter: CommandExecutedWaiter = client.get_waiter(\"command_executed\")\n        # await waiter.wait(CommandId=\"your-command-id\", InstanceId=\"your-instance-id\")\n        print(\"Waiter retrieved. Actual wait requires command/instance IDs.\")\n\nif __name__ == \"__main__\":\n    asyncio.run(describe_instance_information())","lang":"python","description":"This quickstart demonstrates how to use `types-aiobotocore-ssm` with `aiobotocore` to create a typed SSM client, call an asynchronous operation, and retrieve a typed waiter. Explicit type annotations (e.g., `# type: SSMClient`) are optional but can improve clarity and provide better IDE support. Remember to install `aiobotocore` as a runtime dependency."},"warnings":[{"fix":"Upgrade your Python interpreter to version 3.9 or newer.","message":"Python 3.8 support has been removed from all `mypy-boto3-builder` generated stub packages, including `types-aiobotocore-ssm`, starting with `mypy-boto3-builder` version 8.12.0.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, types-aiobotocore-ssm >= 3.4.0"},{"fix":"Review your code for any explicit imports or usage of `TypeDef` names, and update them according to the new naming conventions. Consult the specific service's `type_defs.pyi` for correct names if unsure.","message":"Type definition (TypeDef) naming conventions were changed in `mypy-boto3-builder` version 8.9.0. This includes shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving the `Extra` postfix. Code explicitly importing and using these TypeDefs may break.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Always ensure `aiobotocore` is installed in your environment alongside `types-aiobotocore-ssm`. For example: `pip install types-aiobotocore-ssm aiobotocore`.","message":"`types-aiobotocore-ssm` provides only type annotations (stubs) for the `aiobotocore` SSM client. It does not include the actual `aiobotocore` runtime library, which must be installed separately for your application to function.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your type checker is up-to-date and correctly configured to find PEP 561-style stub packages. Most common setups should work without manual intervention.","message":"As of `mypy-boto3-builder` 8.12.0, stub packages have migrated to PEP 561 compliance. This means stubs are installed alongside the runtime library and are automatically discovered by type checkers like MyPy. If you had custom configurations for stub discovery, they might need adjustment.","severity":"gotcha","affected_versions":"mypy-boto3-builder >= 8.12.0, types-aiobotocore-ssm >= 3.4.0"},{"fix":"Consider using `types-aiobotocore-lite` instead, which is more RAM-friendly. Alternatively, disable PyCharm's internal type checker and use an external tool like `mypy` or `pyright` for type checking.","message":"PyCharm users might experience slow performance or high CPU usage with Literal overloads in type stubs (issue PY-40997).","severity":"gotcha","affected_versions":"All versions, specific to PyCharm users"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed with `pip install types-aiobotocore-ssm`. Verify the import path is `from types_aiobotocore_ssm.client import SSMClient` (using underscores, not hyphens).","cause":"The `types-aiobotocore-ssm` package is either not installed, or there is a typo in the import statement.","error":"ModuleNotFoundError: No module named 'types_aiobotocore_ssm'"},{"fix":"Verify that `aiobotocore` is installed (`pip install aiobotocore`). Ensure your type checker (e.g., MyPy) is correctly configured and running against your environment. For explicit typing, consider `client: SSMClient` after `create_client`.","cause":"This error, or similar type mismatches for `client` methods, often indicates that the `aiobotocore` runtime library is not installed, or that the type checker is not correctly linking the stubs with the runtime.","error":"TypeError: Argument of type 'SSMClient' cannot be assigned to parameter 'client' of type 'SSMClient' in aiobotocore.session.ClientCreator.create_client"},{"fix":"Ensure all client calls are `await`ed, as `aiobotocore` clients are asynchronous. For example, `await client.send_command(...)`. Also, double-check method names against `aiobotocore`'s documentation, as they might differ slightly from `boto3`.","cause":"You are likely calling an asynchronous method on the `aiobotocore` client without using `await`, or attempting to use a `boto3` client method signature on an `aiobotocore` client.","error":"AttributeError: 'SSMClient' object has no attribute 'send_command' (or similar method error)"}]}