> For the complete documentation index, see [llms.txt](https://docs.hockeystack.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hockeystack.com/integrations/datasyncs/connecting-your-warehouse/authenticate-s3/use-an-s3-user.md).

# Use an S3 User

### Setting up an IAM Role (in development)

If using an IAM role to provide access

1\) **Create a policy that allows access to the bucket:**&#x20;

* Go to the AWS IAM Console → Policies → Create Policy
* Go to the JSON tab
* Copy the following policy and paste it into the visual editor. Replace `{your-bucket-name}` with the name of your S3 bucket.

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
        "Effect": "Allow",
        "Action": [
                "s3:GetBucketLocation",
                "s3:GetObject",
                "s3:ListBucket"

        ],
        "Resource": [
                "arn:aws:s3:::{your-bucket-name}/*",
                "arn:aws:s3:::{your-bucket-name}"
        ]
        }
    ]
}
```

* You can save the policy as `HockeyStack-DataSyncs-S3Access` &#x20;

\
2\) **Create an IAM user:**&#x20;

* Go to the AWS IAM Console → Users → Add Users
* After creating a user name, select "Attach Policies Directly" to add the `HockeyStack-DataSyncs-S3Access`  policy created in the previous step

3\) **Retrieving the Access Key and Secret Access Key**

* In the Users tab, find the user we created&#x20;
* Go to **Security credentials** tab and navigate to the **Access keys** section
* Click **Create access key**
* From the **Use Case** options, select the **Third-party service** option and then click **Next**
* Enter a **Description tag value** and then click **Create access key**
* Copy the **Access key** and **Secret access key** values


---

# 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://docs.hockeystack.com/integrations/datasyncs/connecting-your-warehouse/authenticate-s3/use-an-s3-user.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.
