---
title: "Boto3"
description: "Learn how to set up Sentry's Boto3 integration and how to capture requests as spans."
url: https://docs.sentry.io/platforms/python/integrations/boto3/
last_updated: 2026-11-16T09:14:11.000Z
---

# Boto3 for Python

The Boto3 integration instruments requests made to Amazon Web Services done with [Boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) (or the low level [botocore](https://github.com/boto/botocore) library that Boto3 uses under the hood).

In SDK `3.x`, and in stream mode in SDK `2.x`, this page's references to "transaction" apply to service spans instead. See [Streamed Spans](https://docs.sentry.io/platforms/python/tracing/streamed-spans.md) for more information.

## [Prerequisites](https://docs.sentry.io/platforms/python/integrations/boto3.md#prerequisites)

You need:

* A Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects.md)

* Your application up and running

* botocore `1.16+`

* Python:

  * `3.6+` (SDK <3.0)
  * `3.7+` (SDK 3.0+)

## [Install & Configure](https://docs.sentry.io/platforms/python/integrations/boto3.md#install--configure)

Follow our [quick start guide](https://docs.sentry.io/platforms/python.md) to set up Sentry in your Python application (make sure to enable tracing). Sentry's Boto3 integration is enabled automatically if you have the `boto3` package in your dependencies.

## [Verify Your Setup](https://docs.sentry.io/platforms/python/integrations/boto3.md#verify-your-setup)

To verify that Sentry captures your Boto3 requests to Amazon Web Services, add this code to your app, which will create a service span called `testing_sentry` in the [Traces](https://sentry.io/orgredirect/organizations/:orgslug/explore/traces/) section:

```python
import sentry_sdk
import boto3

def main():
    # same as in the Python quick start guide (https://docs.sentry.io/platforms/python)
    sentry_sdk.init(...)

    s3 = boto3.resource('s3')

    # In SDK 2.x, use sentry_sdk.start_transaction(name="testing_sentry") instead
    with sentry_sdk.start_span(name="testing_sentry"):
        # make a request to the service and print out bucket names
        for bucket in s3.buckets.all():
            print(bucket.name)

main()
```

## [Next Steps](https://docs.sentry.io/platforms/python/integrations/boto3.md#next-steps)

At this point, you should have integrated Sentry into your application and should already be sending data to your Sentry project.

Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:

* Explore [practical guides](https://docs.sentry.io/get-started/guides.md) on what to monitor, log, track, and investigate after setup
* Continue to [customize your configuration](https://docs.sentry.io/platforms/python/configuration.md)
* Learn more about [manually capturing errors or messages](https://docs.sentry.io/platforms/python/usage.md)
* Dive straight into the API with our [API docs](https://getsentry.github.io/sentry-python/)

Are you having problems setting up the SDK or integration?

* Find various topics in [Troubleshooting](https://docs.sentry.io/platforms/python/troubleshooting.md)
* [Get support](https://www.sentry.help/en/)

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
