Skip to main content

How to authenticate to an AWS S3 bucket

Prerequisites

To connect AWS S3 with Rhombus AI, you need to:

  1. Create S3 bucket.
  2. Create IAM policy.
  3. Create IAM user.
  4. Generate your Access key and Secret Key.
  5. Get your bucket name.

Step 1. Create Bucket

Create a bucket in S3 and get the container name.

Create IAM Policy Screenshot

Step 2. Create IAM Policy

You must create an IAM policy for both the IAM Role and Access Key and Secret approaches.

  1. Go to Identity and Access Management (IAM)Policies and click Create Policy.

    Open IAM Console and Create Policy

  2. Go to the JSON tab.

  3. Copy the following policy and paste it into the visual editor. Replace {your-bucket-name} with the name of your S3 bucket. After that, click Next.

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

    Note: The s3:PutObject permission is optional, but it's essential if you need to save files to the bucket.

    Enter IAM Policy JSON

  4. Enter a meaningful name to identify this policy.

    Copied IAM Policy ARN

  5. Create a policy.

Step 3. Create IAM User

  1. In the Users tab, click to create user.

  2. In the Attach policies directly tab, attach the created policy.

    Attach IAM Policy to Role

  3. Click Next, then click Create user.

Step 4. Generate your Access key and Secret Key

  1. In the Users tab, open the created User.

  2. Go to Security credentials tab and navigate to the Access keys.

    View AWS Access Keys

  3. Select third-party service.

    Configure Third-Party Application Access

  4. Retrieve Access key & Secret access key

    Retrieve AWS Access and Secret Keys