> For the complete documentation index, see [llms.txt](https://indexone.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://indexone.gitbook.io/docs/product-guides/index-maintenance/set-up-s3-data-retrieval.md).

# Set up S3 data retrieval

## Step 1: Set up S3 delivery stream on Streams

Navigate to the [Streams](https://indexone.io/streams) page and set up a delivery a stream with the below configurations.

<figure><img src="/files/Qw349iFw58JFsdnYWnre" alt=""><figcaption></figcaption></figure>

## Step 2: Retrieve data from the S3 bucket&#x20;

Use this code to retrieve data from Index One's S3 bucket in Python.

Team directory is equal to the team\_id which is accessible from the Team page in the console.

```
import boto3

access_key = "xxxxxxxxxxxxxxxxxxxx"
secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
bucket_name = "prod-core-i1-export"
team_directory = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/"

session = boto3.Session(
    aws_access_key_id=access_key,
    aws_secret_access_key=secret
)

s3_client = session.client("s3")

r = s3_client.list_objects_v2(
    Bucket=bucket_name,
    Prefix=team_directory
)

for object in r['Contents']:
    s3_client.download_file(
        bucket_name,
        object['Key'],
        '/my/local/dir/filename.csv'
    )
```

Please get in touch with **<admin@indexone.io>** to request S3 access keys.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://indexone.gitbook.io/docs/product-guides/index-maintenance/set-up-s3-data-retrieval.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
