# Amazon S3

## Configure your S3 bucket

Follow these steps to configure your Amazon S3 bucket to receive your Datastream feed:

1. Log in to Amazon Web Services and create a new bucket for Chartbeat data files.
2. Add the correct bucket policy to provide permissions for Chartbeat to access.
3. Chartbeat needs the IAM role to have write access for the bucket. These actions are s3:PutObject, s3:GetObject, s3:ListBucket.
4. Please find our S3 policy below. You will need to specify the name of your bucket in this policy to allow Chartbeat’s IAM role to access your bucket.
5. Let us know when your S3 bucket policy is set up and the bucket name&#x20;

### Chartbeat S3 policy

The first step is creating the bucket policy itself, you just need to change the entry under "Resource" to the name of your S3 bucket:

```
{
  "Id": "Policy1464981107152",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1464981098061",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:ListBucket"
      ],
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::your-bucket-name-here/*", "arn:aws:s3:::your-bucket-name-here"],
      "Principal": {
        "AWS": [
          "arn:aws:iam::273001990628:role/lambda_llrs_execution_role"
        ]
      }
    }
  ]
}
```

To set this policy on the bucket:

1. Go to your AWS S3 dashboard (<https://console.aws.amazon.com/s3>)
2. Click on the bucket you want to use in the list on the left.
3. Click the "Properties" button on the right.
4. Expand the "Permissions" tab below that.
5. Click the "Add Bucket Policy" button.
6. Paste the bucket policy into the text box, hit save.
7. Email your account manager with a confirmation and let them know so we can turn on your feeds.

## Redshift

If relevant, review our guide to loading Datastream data from your S3 bucket into an [**Amazon Redshift cluster here**](/datastream/getting-started/playbooks/amazon-redshift.md).


---

# 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.chartbeat.com/datastream/destination-setup/amazon-s3.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.
