{"id":3838,"library":"types-boto3-full","title":"Type Annotations for boto3 (full)","description":"types-boto3-full provides comprehensive type annotations for the popular AWS SDK for Python, boto3. It is an 'all-in-one' package that bundles all service-specific type stubs generated by mypy-boto3-builder. This allows for static type checking of boto3 code using tools like MyPy, catching potential errors before runtime. The current version is 1.42.88, matching the boto3 version it provides stubs for, and is frequently updated in sync with boto3 releases and mypy-boto3-builder enhancements.","status":"active","version":"1.42.88","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type-stubs","aws","boto3","mypy","static-analysis","typescripting"],"install":[{"cmd":"pip install types-boto3-full boto3","lang":"bash","label":"Install stubs and boto3"}],"dependencies":[{"reason":"Provides runtime functionality; types-boto3-full only supplies type annotations for it.","package":"boto3","optional":false},{"reason":"Requires Python 3.9 or higher due to recent updates in the stub generator.","package":"python","optional":false}],"imports":[{"note":"types-boto3-full is a meta-package. Its type definitions are typically imported from the `boto3_stubs` namespace (e.g., `boto3_stubs.service_name.client` or `boto3_stubs.session`). You typically use `TYPE_CHECKING` to conditionally import these.","symbol":"S3Client","correct":"from boto3_stubs.s3.client import S3Client"},{"note":"Use this for type-hinting the main boto3 session object.","symbol":"Session","correct":"from boto3_stubs.session import Session"}],"quickstart":{"code":"from typing import TYPE_CHECKING\nimport boto3\nimport os\n\n# Conditionally import type stubs only for type checking\nif TYPE_CHECKING:\n    from boto3_stubs.s3.client import S3Client\n    from boto3_stubs.session import Session\n\n# Instantiate a boto3 session (runtime code)\nsession: 'Session' = boto3.session.Session(\n    region_name=os.environ.get('AWS_REGION', 'us-east-1'),\n    aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),\n    aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET')\n)\n\n# Get an S3 client and type-hint it\ns3_client: 'S3Client' = session.client('s3')\n\ntry:\n    # This call will be type-checked by MyPy\n    buckets = s3_client.list_buckets()\n    print(f\"Successfully listed {len(buckets.get('Buckets', []))} S3 buckets.\")\nexcept Exception as e:\n    print(f\"Error listing S3 buckets: {e}\")\n\n# To type-check this file, run:\n# pip install mypy\n# mypy your_script_name.py","lang":"python","description":"This quickstart demonstrates how to use types-boto3-full for static type checking with boto3. It shows conditional imports for type stubs and then applies them to a standard boto3 client interaction. Ensure you have `boto3` and `mypy` installed alongside `types-boto3-full`."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, pin `types-boto3-full` to a version older than 1.42.0 (e.g., `types-boto3-full<1.42`).","message":"Python 3.8 support has been removed as of `mypy-boto3-builder` version 8.12.0 (which generates `types-boto3-full` 1.42.x and above).","severity":"breaking","affected_versions":"1.42.x and above"},{"fix":"Always install `boto3` alongside `types-boto3-full` (e.g., `pip install boto3 types-boto3-full`).","message":"`types-boto3-full` provides type stubs only. You must also install `boto3` separately for your code to run at runtime.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Migrate your code to use the `pinpoint-sms-voice` service client instead of `sms-voice`.","message":"The `sms-voice` service was removed in `mypy-boto3-builder` 8.11.0 (generating `types-boto3-full` 1.41.x+). It is no longer supported; use `pinpoint-sms-voice` instead.","severity":"breaking","affected_versions":"1.41.x and above"},{"fix":"Review your code for direct references to specific TypedDict names and adjust them according to the new conventions. Type checkers will highlight these breaking changes.","message":"TypedDict naming conventions were changed in `mypy-boto3-builder` 8.9.0 (generating `types-boto3-full` 1.39.x+), potentially shortening names or reordering suffixes (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`).","severity":"breaking","affected_versions":"1.39.x and above"},{"fix":"Do not add `import types_boto3_full` to your runtime code. Instead, import specific type definitions from `boto3_stubs` conditionally using `if TYPE_CHECKING:`.","message":"The package `types-boto3-full` itself is not meant to be imported directly at runtime. It's a collection of stub files that a type checker (like MyPy) uses to understand `boto3`'s types.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}