{"id":3685,"library":"mypy-boto3-rolesanywhere","title":"Type Annotations for Boto3 IAM Roles Anywhere","description":"mypy-boto3-rolesanywhere provides static type annotations for the `boto3` IAM Roles Anywhere service client. It is part of the `mypy-boto3` project, which generates comprehensive type stubs for all AWS services supported by `boto3`, significantly enhancing code quality and developer experience through static analysis. The library is actively maintained with frequent updates, currently at version 1.42.5, typically aligning with `boto3` and `botocore` releases.","status":"active","version":"1.42.5","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","mypy","type-hints","aws","rolesanywhere","typescript-for-python"],"install":[{"cmd":"pip install mypy-boto3-rolesanywhere","lang":"bash","label":"Install service-specific stubs"},{"cmd":"pip install boto3 mypy-boto3-rolesanywhere","lang":"bash","label":"Install with Boto3 runtime"}],"dependencies":[{"reason":"Provides the runtime functionality that these type stubs enhance. Required to use the typed client/resource objects.","package":"boto3","optional":false}],"imports":[{"wrong":"from mypy_boto3_rolesanywhere import RolesAnywhereClient","symbol":"RolesAnywhereClient","correct":"from mypy_boto3_rolesanywhere import RolesAnywhereClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_rolesanywhere.client import RolesAnywhereClient\nfrom mypy_boto3_rolesanywhere.type_defs import ListProfilesResponseTypeDef\n\n# Get a Boto3 Roles Anywhere client, explicitly typed for mypy\nclient: RolesAnywhereClient = boto3.client(\"rolesanywhere\")\n\ntry:\n    # Call an operation; mypy will now provide completions and type checking\n    response: ListProfilesResponseTypeDef = client.list_profiles()\n\n    print(f\"Successfully listed {len(response.get('profiles', []))} RolesAnywhere profiles.\")\n    if 'nextToken' in response:\n        print(f\"Next token available: {response['nextToken']}\")\n\nexcept client.exceptions.AccessDeniedException as e:\n    print(f\"Access Denied: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` IAM Roles Anywhere client and apply the type hints provided by `mypy-boto3-rolesanywhere`. This allows for static type checking and improved IDE auto-completion when interacting with the service. Ensure `boto3` is also installed."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher.","message":"Support for Python 3.8 was removed starting with `mypy-boto3-builder` version 8.12.0. Packages generated by this builder (including `mypy-boto3-rolesanywhere`) will not function correctly on Python 3.8.","severity":"breaking","affected_versions":">=8.12.0 of `mypy-boto3-builder` and its generated packages"},{"fix":"Ensure your `mypy` configuration is up-to-date. Standard import paths like `from mypy_boto3_rolesanywhere.client import RolesAnywhereClient` remain stable.","message":"The `mypy-boto3` ecosystem, including `mypy-boto3-rolesanywhere`, migrated to PEP 561 compliant packages with `mypy-boto3-builder` version 8.12.0. This might affect advanced build setups or custom type checking configurations.","severity":"breaking","affected_versions":">=8.12.0 of `mypy-boto3-builder` and its generated packages"},{"fix":"Ensure both `mypy-boto3-rolesanywhere` and `boto3` are installed: `pip install boto3 mypy-boto3-rolesanywhere`.","message":"This library provides type stubs only. For runtime functionality, the `boto3` library must be installed alongside `mypy-boto3-rolesanywhere`. Forgetting `pip install boto3` is a common mistake.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the updated type definitions in the `mypy-boto3-rolesanywhere.type_defs` module. IDE auto-completion usually helps in finding the correct names.","message":"TypeDef argument names for methods were shortened and conflicting TypeDef `Extra` postfixes were reordered in `mypy-boto3-builder` version 8.9.0. If you explicitly import or reference specific TypeDefs for request/response bodies, their names may have changed.","severity":"breaking","affected_versions":">=8.9.0 of `mypy-boto3-builder` and its generated packages"}],"env_vars":null,"search_vec":"'1.42.5':66 'activ':58 'align':68 'analysi':54 'annot':2,15 'anywher':7,21 'aw':40,79 'boto3':4,10,18,31,44,70,74 'botocor':72 'client':23 'code':47 'comprehens':35 'current':63 'develop':50 'enhanc':46 'experi':51 'frequent':61 'generat':34 'hint':78 'iam':5,19 'librari':56 'maintain':59 'mypi':9,30,75 'mypy-boto3':29 'mypy-boto3-rolesanywhere':8 'part':26 'project':32 'provid':12 'python':84 'qualiti':48 'releas':73 'role':6,20 'rolesanywher':11,80 'servic':22,41 'signific':45 'static':13,53 'stub':37 'support':42 'type':1,14,36,77 'type-hint':76 'typescript':82 'typescript-for-python':81 'typic':67 'updat':62 'version':65","created_at":"2026-04-11T17:40:18.593011+00:00","updated_at":"2026-04-16T17:10:31.864901+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp08wwdc1l/venv/lib/python3.12/site-packages/mypy_boto3_rolesanywhere/__init__.py\", line 31, in <module>\n    from .client import IAMRolesAnywhereClient\n  File \"/tmp/tmp08wwdc1l/venv/lib/python3.12/site-packages/m"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.58","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_rolesanywhere/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-rolesanywhere/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-29","next_check":"2026-07-10","install_tag":null}}