Skip to content

Type annotations for boto3#

Auto-generated documentation for boto3 type annotations package boto3-stubs.

Generated with mypy-boto3-builder 8.7.0.

How to install#

You can generate type annotations for boto3 package locally with mypy_boto3_builder. Use uv for build isolation.

  1. Run mypy-boto3-builder in your package root directory: uvx --with 'boto3==1.35.86' mypy_boto3_builder
  2. Select boto3-stubs AWS SDK.
  3. Select services you use in the current project.
  4. Use provided commands to install generated packages.

VSCode extension#

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Auto-discover services and select services you use in the current project.

From PyPI with pip#

Install boto3-stubs to add type checking for boto3 package.

# install type annotations only for boto3
python -m pip install boto3-stubs

# install boto3 type annotations
# for cloudformation, dynamodb, ec2, lambda, rds, s3, sqs
python -m pip install 'boto3-stubs[essential]'

# or install annotations for services you use
python -m pip install 'boto3-stubs[acm,apigateway]'

# or install annotations in sync with boto3 version
python -m pip install 'boto3-stubs[boto3]'

# or install all-in-one annotations for all services
python -m pip install 'boto3-stubs[full]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[essential]'

From conda-forge#

Add conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, boto3-stubs and boto3-stubs-essential can be installed with:

conda install boto3-stubs boto3-stubs-essential

List all available versions of boto3-stubs available on your platform with:

conda search boto3-stubs --channel conda-forge

How to uninstall#

# uninstall boto3-stubs
python -m pip uninstall -y boto3-stubs

Packages#