# Setting up an AWS S3 connector

## Configuring the AWS S3 connector in Toucan

The AWS S3 connector lets you access files hosted in an AWS S3 bucket. We use AWS STS (Security token Service) to authenticate to the S3 bucket via the [Assume Role function](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).

<table><thead><tr><th>Field</th><th width="89.9453125">Format / Type</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>Name (mandatory)</td><td>String</td><td>Use it to identify your connection</td><td><em>MyS3Connection</em></td></tr><tr><td>Bucket Name (mandatory)</td><td>String</td><td>the S3 bucket name you want to query data from</td><td><em>bucket_s3_name</em></td></tr><tr><td>Prefix (Optional)</td><td>String</td><td>a prefix for your object like a path folder</td><td><em>marketing/</em></td></tr><tr><td>Role ARN (mandatory)</td><td>String</td><td>AWS Amazon Ressources Names (ARN), identifier that provides access to AWS ressources, configured with policies. Will be given to you by Toucan support</td><td></td></tr><tr><td>ExternalId (mandatory)</td><td>String</td><td>already set, represents an ID used in AWS policy configuration</td><td></td></tr><tr><td>Retry Policy (optional)</td><td>Boolean</td><td><p><em>Boolean</em> allows to configure a retry policy if the connection is flaky.</p><ul><li>max attempts: maximum number of retries before giving up</li><li>max_delay: in seconds, above the connection is dropped</li><li>wait_time: time in seconds between each retry</li></ul></td><td></td></tr><tr><td>Slow Queries' Cache Expiration Time (optional)</td><td>Integer</td><td>Slow queries' cache expiration time in seconds</td><td></td></tr></tbody></table>

Click on the `TEST CONNECTION` button then `SAVE` the connection

{% hint style="success" %}
After successfully configuring the connector, you will be able to find it in the Connector section of the DataHub "Datasource" tab
{% endhint %}

## Selecting data from AWS S3

To create a dataset from AWS S3, click on the "create from icon", you will then be able to:

* Select a file hosted in your S3 bucket

{% hint style="success" %}
After selecting data from your connector you will be able to create a dataset thanks to [YouPrep](https://docs-v3.toucantoco.com/data-management-in-datahub/datasets-in-toucan/preparing-data/overview-of-youprep-tm) using the selection as "source step".
{% endhint %}
