How to Install boto3 in Python
The AWS SDK for Python
pip install boto3
What is boto3?
The AWS SDK for Python
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2. You can find the latest, most up to date, documentation at our , including a list of services that are supported.
Boto (pronounced boh-toh) was named after the fresh water dolphin native to the Amazon river. The name was chosen by the author of the original Boto library, Mitch Garnaat, as a reference to the company.
On 2026-04-29, support for Python 3.9 will end for Boto3. This follows the Python Software Foundation for the runtime which occurred on 2025-10-31.
Quick Start
Minimal example to get started with boto3:
import boto3
# List S3 buckets
s3 = boto3.client("s3")
response = s3.list_buckets()
for bucket in response["Buckets"]:
print(bucket["Name"])
# Upload a file
s3.upload_file("local.txt", "my-bucket", "remote.txt")
Installation
pip (standard)
pip install boto3
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install boto3
pip3
pip3 install boto3
conda
conda install -c conda-forge boto3
Poetry
poetry add boto3
Dependencies
Installing boto3 will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import boto3; print(boto3.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing boto3 with pip.
ModuleNotFoundError: No module named 'boto3'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install boto3. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'boto3' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install boto3 to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'boto3'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show boto3 and upgrade with pip install --upgrade boto3.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install boto3. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user boto3
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org boto3
Runtime Errors
Common errors when using boto3 after installation.
botocore.exceptions.NoCredentialsError
Cause: AWS credentials are not configured.
Fix: Run aws configure, set AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY env vars, or attach an IAM role.
botocore.exceptions.ClientError: AccessDenied
Cause: The IAM user or role lacks permission for the operation.
Fix: Add the required IAM permission (e.g., s3:GetObject) to the user or role policy.
botocore.exceptions.EndpointConnectionError
Cause: Wrong region specified or no network access to the AWS endpoint.
Fix: Set the correct region: boto3.client('s3', region_name='us-east-1')
Recent Releases
| Version | Released |
|---|---|
1.42.88 latest |
2026-04-10 |
1.42.86 |
2026-04-09 |
1.42.87 |
2026-04-09 |
1.42.85 |
2026-04-07 |
1.42.84 |
2026-04-06 |
Manage boto3
Upgrade to latest version
pip install --upgrade boto3
Install a specific version
pip install boto3==1.42.88
Uninstall
pip uninstall boto3
Check what is installed
pip show boto3