# AWS S3 integration

## Generating a limited S3 read user and keys

{% hint style="info" %}
You can skip this step and go down to if you already have AWS Access Key ID and Secret Key ID for the S3 buckets you wish to integrate
{% endhint %}

Log into the AWS console and navigate to the **IAM Dashboard** → **Users***.*  Then, click **Add User.**

![](/files/1ShAyvC95OUV01dk8T7j)

From the Add User screen, pick any username, like *biodock-s3-access,* and check **Programmatic access.**

On the next screen, select **Attach existing policies directly** and search for S3.  From the results, choose AmazonS3ReadOnlyAccess.

![](/files/ugQOfh7tRTf0HJY5im81)

*Note:  If you want to restrict access to a single bucket, you will need to create a custom policy and attach it to the user.  An example minimum policy is shown at the bottom of this page.*

Once you have created your user by clicking next through the screens, make sure to copy this user's AWS Key ID & Secret Key ID for the next step.

## Connecting your S3 Bucket with Biodock

Navigate to the **Files** page on the left sidebar and select the **Amazon S3** option --

![](/files/7m5zh9Uio4LZHCr1oVXD)

Provide your AWS Access Key & Secret. Your keys are AES-256 encrypted and stored but you can disconnect at any time using the **Disconnect** button on the top right, which will purge your keys from Biodock.

You can **search** only by prefix in the S3 file explorer (this restriction is created by AWS).  Type in the prefix for the desired files or folders you want to import into Biodock and click **Import to Biodock** and then choose the location in **My Files** where you would like to import the image.

![](/files/6OJCAMvTF8r36GsWzuoq)

![](/files/cAFZj6qB9bJJpHdkJp7Z)

You can then navigate to **My Files** and start using your imported files in Biodock. See [Running AI Analysis on Images](broken://pages/bdEIYXiQz4t5Hwt0u5T8).

![](/files/EHu5pAE0ajt97mHHxl7J)

### Minimum working policy

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::test-examples-biodock", // Replace with your bucket
                "arn:aws:s3:::test-examples-biodock/*" // Replace with your bucket
            ]
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "*"
        }
    ]
}
```


---

# Agent Instructions: 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:

```
GET https://docs.biodock.ai/files/aws-s3-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
