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

# AWS S3

> Here you can find the documentation for configuring AWS S3 bucket in Coolify.

# TLDR

1. Create a bucket in AWS Console
2. Create a custom policy in AWS Console with the following permissions:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket",
        "s3:GetObject",
        "s3:DeleteObject",
        "s3:GetObjectAcl",
        "s3:PutObjectAcl",
        "s3:PutObject"
      ],
      "Resource": [
        // rewrite your-bucket-name with your bucket name
        "arn:aws:s3:::your-bucket-name",
        "arn:aws:s3:::your-bucket-name/*"
      ]
    }
  ]
}
```

3. Create an IAM user in AWS Console & attach the policy from the previous step.
4. Go to User settings & create an `Access Key` in AWS Console.
5. Add the `Access Key` and `Secret Key` in Coolify when you create a new S3 source.
   <Tip>
     You need to use the S3 HTTP endpoit without the bucket name, for example,
     `https://s3.eu-central-1.amazonaws.com`.
   </Tip>

# Detailed steps

### Create a bucket

<Steps>
  <Step title="Create a bucket.">
    Go to [AWS Console](https://us-east-1.console.aws.amazon.com/s3/buckets) and
    create a new bucket. ![1](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/1-bucket.jpeg)
  </Step>

  <Step title="Name your bucket.">![2](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/2-bucket.jpeg)</Step>
</Steps>

### Create a new policy

<Steps>
  <Step title="Create a new policy.">
    Go to [AWS Console](https://us-east-1.console.aws.amazon.com/iam/home) and create a new policy.
    ![1](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/1-policy.jpeg)
  </Step>

  <Step title="Name & configure your policy.">
    Add the following JSON permissions to your policy (replace `your-bucket-name` with your bucket name):

    ```json
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "s3:ListBucket",
            "s3:GetObject",
            "s3:DeleteObject",
            "s3:GetObjectAcl",
            "s3:PutObjectAcl",
            "s3:PutObject"
          ],
          "Resource": [
            "arn:aws:s3:::your-bucket-name",
            "arn:aws:s3:::your-bucket-name/*"
          ]
        }
      ]
    }
    ```

    ![2](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/2-policy.jpeg)
    ![3](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/3-policy.jpeg)
  </Step>
</Steps>

### Create a new IAM user

<Steps>
  <Step title="Create a new IAM User.">
    Go to [AWS Console](https://us-east-1.console.aws.amazon.com/iam/home) and
    create a new user. ![1](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/1-iam.jpeg)
  </Step>

  <Step title="Name your user.">![2](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/2-iam.jpeg)</Step>

  <Step title="Attach the policy created in the previous step.">
    ![3](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/3-iam.jpeg)
  </Step>

  <Step title="Go to your user settings.">![4](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/4-iam.jpeg)</Step>

  <Step title="Create a new `Access Key`.">
    ![5](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/5-iam.jpeg)
  </Step>

  <Step title="Set `Other` as use-case.">![6](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/6-iam.jpeg)</Step>

  <Step title="Copy the `Access Key` & `Secret Access Key`.">
    You will need it to configure this S3 storage in Coolify.
    ![7](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/7-iam.jpeg)
  </Step>
</Steps>

### Configure S3 in Coolify

<Steps>
  <Step title="Add new S3 Storage">
    Go to your Coolify instance and create a new S3 storage.
    ![1](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/1-coolify.jpeg)
  </Step>

  <Step title="Add the details.">
    Make sure you use the S3 HTTP endpoint without the bucket name. For example,
    `https://s3.eu-central-1.amazonaws.com`. ![2](https://mintlify.s3-us-west-1.amazonaws.com/coollabstechnologiesbt/images/aws-s3/2-coolify.jpeg)
  </Step>
</Steps>

Well done!
