How to configure AWS S3 bucket in HCS

AWS S3

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

TLDR

  1. Create a bucket in AWS Console

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

{
  "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/*"
      ]
    }
  ]
}
  1. Create an IAM user in AWS Console & attach the policy from the previous step.

  2. Go to User settings & create an Access Key in AWS Console.

  3. Add the Access Key and Secret Key in HCS when you create a new S3 source

Detailed steps

Create a bucket

Go to AWS Console and create a new bucket.

Name your bucket.

Create a new policy

Create a new policy.

Go to AWS Console and create a new policy.

Add the following JSON permissions to your policy (replace your-bucket-name with your bucket name):

{
  "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/*"
      ]
    }
  ]
}

Create a new IAM user

Create a new IAM User.

Go to AWS Console and create a new user.

Name your user.

Attach the policy created in the previous step.

Go to your user settings.

Create a new Access Key.

Set Other as use-case.

Copy the Access Key & Secret Access Key.

You will need it to configure this S3 storage in HCS.

Configure S3 in HCS

Add new S3 Storage Go to your HCS instance and create a new S3 storage.

Add the details.

Make sure you use the S3 HTTP endpoint without the bucket name. For example, https://s3.eu-central-1.amazonaws.com.

Well done!

Last updated