> ## Documentation Index
> Fetch the complete documentation index at: https://docs.adriel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to connect

> How to connect the Amazon S3 data source to Adriel: create AWS access keys, point to a bucket and file path, and import CSV, XLSX, or Zipped CSV files.

Amazon S3 is Amazon Web Services' object storage service. Connecting it lets Adriel ingest CSV, XLSX, and Zipped CSV files from a bucket, which is useful for partner exports, reports from platforms that lack a native data source, and curated datasets that already land in object storage on a regular cadence.

## Before you connect

The following are required:

* An Amazon S3 bucket containing the data files.
* The bucket's AWS region, for example `us-east-1`.
* The directory path (prefix) within the bucket where the files reside.
* An AWS access key ID and secret access key with read access to that bucket and prefix.

If access keys have not been created yet, generate them in the AWS console first.

### Create an AWS access key and secret

<Steps>
  <Step title="Open the IAM console">
    Sign in to the AWS Management Console and open the **IAM** service. Use (or create) an IAM user that has read access to the target S3 bucket rather than root account credentials.
  </Step>

  <Step title="Scope a least-privilege read-only policy">
    Attach a policy that grants only what the connector needs: **s3:ListBucket** on the bucket and **s3:GetObject** on the objects under the target prefix. Scope both actions to the specific bucket ARN so the key cannot read other buckets.
  </Step>

  <Step title="Create the access key">
    On the IAM user's page, open the **Security credentials** tab, go to **Access keys**, and click **Create access key**. Copy the **Access key ID** and the **Secret access key**. The secret access key is shown only once, so store it before leaving the page.
  </Step>
</Steps>

<Warning>
  The secret access key is displayed only at creation time and cannot be retrieved later. If it is lost, create a new access key and delete the old one.
</Warning>

## Connect Amazon S3

<Steps>
  <Step title="Open the data source">
    On the **Data Sources** page, search for **Amazon S3** and select it.
  </Step>

  <Step title="Enter the AWS connection details">
    Provide the connection details for the AWS account, then click **Submit**:

    * **Name** — a readable name for the connection.
    * **AWS Access Key** — the access key ID created above.
    * **AWS Secret** — the secret access key created above.
    * **AWS Region** — the bucket's region, for example `us-east-1`.
    * **S3 Bucket** — the bucket that holds the files.
    * **Directory Path** — the path (prefix) to the files under the bucket, for example `exports/daily`. Do not end the prefix with a slash.
  </Step>

  <Step title="Configure the data source file settings">
    Set the file options for this data source, then click **Submit**:

    * **Name** (required) — an identifiable name for the data source.
    * **File Type** (required) — the format of the files to import.
    * **File Name to Filter** (optional) — a word found within the file names, used to import only matching files. This value is case-sensitive.
    * **Header Row** (optional) — the row number where the real data begins.
    * **Alternative Channel Name** (optional) — an alternative display name for the data source.
  </Step>

  <Step title="Wait for the initial import">
    Initial data availability can take up to one business day. Files under the prefix are listed, downloaded, parsed, and cached for dashboard queries.
  </Step>
</Steps>

## What gets imported

Amazon S3 imports CSV, XLSX, and Zipped CSV files found under the configured bucket prefix. Columns are inferred from the file contents: numeric columns become metrics and text columns become breakdowns. All matching files in the prefix are concatenated, so they must share the same column structure. Files may include a date column, but the connector does not impose a date axis.

For the full field list, see the [Amazon S3 data reference](/data-sources/a-f/amazon-s3/data-reference).

## Troubleshooting

<AccordionGroup>
  <Accordion title="'Access Denied' errors when listing or fetching files">
    The IAM policy is missing one of the required actions. Grant **s3:ListBucket** on the bucket ARN and **s3:GetObject** on the prefix ARN, then retry the connection.
  </Accordion>

  <Accordion title="Files are not discovered under the configured path">
    The directory prefix returns no objects. Verify that the prefix does not end with a slash, that file extensions match the configured format, and that the bucket region matches the configured region.
  </Accordion>

  <Accordion title="Refresh fails with a column-count mismatch">
    A file in the prefix has a different schema than the rest. Remove or normalize the mismatched file, or split the differing layout into a separate data source.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Amazon S3 data reference" href="/data-sources/a-f/amazon-s3/data-reference">
    Fields, refresh cadence, and limits for Amazon S3.
  </Card>

  <Card title="Amazon S3 FAQs" href="/data-sources/a-f/amazon-s3/faqs">
    Common questions and expected behaviors for the Amazon S3 data source.
  </Card>

  <Card title="How to connect File from SFTP" href="/data-sources/a-f/file-from-sftp/how-to-connect">
    Import the same file formats over an SFTP transport.
  </Card>

  <Card title="How to connect CSV files" href="/data-sources/a-f/csv-files/how-to-connect">
    Upload CSV files directly instead of pulling from a bucket.
  </Card>
</CardGroup>
