# Boto3 — card for AI agents

Official AWS SDK for Python enabling developers to write software using AWS services.

Category: SDKs for hosted services · PyPI package `boto3` · latest version 1.43.123 (checked 2026-11-01)
Install: `pip install boto3`
License: Apache-2.0 (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 74.6 (#216 of all tools, 2 of 287 in its category)
- Used in 59 public projects set up for AI coding agents (0.9%)
- Downloads last week: 556,730,555 (as of 2026-11-24), -1.4% over 4 weeks
- GitHub stars: 9,940 (as of 2026-11-24)
- Last push: 2026-11-23

## Often used with
python-dotenv 59.3%, Pydantic 57.6%, Requests 54.2%, FastAPI 52.5%, Uvicorn 49.2%, PyYAML 40.7%

## Checked alternatives (same job)
- Google Cloud Storage (Python): https://agentgid.com/tools/google-cloud-storage-pypi/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/boto3/
- Homepage: https://github.com/boto/boto3
- Repository: https://github.com/boto/boto3


## Boto3: use Amazon Web Services from Python

Boto3 is the free, official Python library from Amazon Web Services (AWS). Your Python app uses it to store files in S3, send messages, work with databases and call other AWS services. You need an AWS account and keys; the services you call are billed to that account.

### Where to use it
- Store user uploads in S3: Profile photos, invoices or exports go into an S3 bucket instead of your server's disk; big files are sent in parallel pieces.
- Time-limited download links: A customer gets a link to their private invoice that works for ten minutes, without the file ever being public.
- List every file in a big bucket: A cleanup or report script walks through all files in a bucket, not just the first thousand that one request returns.
- Test AWS code without an account: Your tests feed boto3 ready-made AWS answers, including errors like a missing file, so they run offline and cost nothing.
- Call AI models on Amazon Bedrock: If your company already runs on AWS, a Python service can call the AI models offered in Amazon Bedrock with the same keys and billing. (idea, not from the official pages)
- Background jobs through a queue: A web app drops a 'make the PDF' message into an SQS queue, and a worker picks it up later, so the page answers at once. (idea, not from the official pages)

### How to start
- Use Python 3.10 or newer in a virtual environment, then install boto3.

```
$ python -m venv .venv
...
$ . .venv/bin/activate
$ python -m pip install boto3
```

- The person sets up credentials and a default region (for example with aws configure); keys stay out of the code.

```
[default]
aws_access_key_id = YOUR_KEY
aws_secret_access_key = YOUR_SECRET
```

- Create a client for the service you need and call it.

```
import boto3
s3 = boto3.client('s3')
```


### License
Free to use in any product, including paid ones, under the Apache 2.0 license. If you pass on its files, include the license. The license gives no right to AWS names or logos.

### Good to know
- Boto3 itself is free, but every AWS service it calls is billed to your account by use.
- You need an AWS account and access keys or another sign-in method first; only the account owner can create them.
- Never write keys into your code; boto3 finds them in environment variables, config files or the server's role.
- It needs Python 3.10 or newer; support for Python 3.9 ended in April 2026.
- Anyone holding a signed download link acts with the rights of the person who made it, until it expires.

Checked 2026-11-10 against: https://github.com/boto/boto3/blob/develop/README.rst, https://github.com/boto/boto3/blob/develop/LICENSE, https://github.com/boto/boto3, https://boto3.amazonaws.com/v1/documentation/api/latest/index.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/clients.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/session.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/paginators.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/error-handling.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html, https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html, https://botocore.amazonaws.com/v1/documentation/api/latest/reference/stubber.html, https://pypi.org/pypi/boto3/1.43.127/json, https://aws.amazon.com/pricing/

### Mistakes to avoid
- Don't: boto3.client('s3', aws_access_key_id='AKIA...', aws_secret_access_key='...') with real keys in the code → Do: Leave keys out of code: AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY in the environment, ~/.aws/credentials, or an IAM role on the server (Keys in code end up in Git history and logs; boto3 finds them on its own.)
- Don't: boto3.client('sqs') with no region configured → Do: boto3.client('sqs', region_name='eu-central-1') or set AWS_DEFAULT_REGION (In our run it raised NoRegionError: You must specify a region.)
- Don't: One list_objects_v2 call to get all files → Do: s3.get_paginator('list_objects_v2').paginate(Bucket=...) (One call returns at most 1,000 objects; the paginator follows the continuation token for you.)
- Don't: Writing new code with boto3.resource('s3') because older tutorials do → Do: Use boto3.client('s3') for new code (Resources get no new features; newer service features arrive through clients.)
- Don't: One boto3.Session() shared by many threads or worker processes → Do: Create a session (and its clients) per thread or process (Sessions are not thread safe; clients cannot be shared across processes.)

### Questions
- Does boto3 cost money? The library is free and open source. The AWS services you call are billed to your AWS account by use.
- Where should the keys go? Not in code. Boto3 searches parameters, environment variables, ~/.aws files and the server's role, in a fixed order.
- Client or resource: which should I use? Use clients for new code; the resource style still works but gets no new features.
- Can I share one client between threads? Clients mostly yes; sessions and resources no. Create a session per thread or process.
- How do I catch errors from AWS? Catch botocore's ClientError and read the error code, or a named exception such as s3.exceptions.NoSuchKey.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
