Configure Amazon S3

You can create a dedicated Amazon S3 bucket to store TechDocs sites. Red Hat Developer Hub uploads TechDocs to this bucket and serves them from the same location.

Before you begin

  • You are logged in to your AWS account as an administrator.

Procedure

  1. On the AWS console, create an AWS S3 bucket.
    1. On the Create bucket page, enter a Bucket name and use the default selections for all other settings.
    2. Create an IAM policy to give authorized users permissions to generate and publish TechDocs for your organization.
    3. On the Create policy > Specify permissions page, in the Policy editor, enter the following JSON content:
      {
          "Version": "2012-10-17",
          "Statement": [
              {
                  "Sid": "TechDocsList",
                  "Effect": "Allow",
                  "Action": "s3:ListBucket",
                  "Resource": "arn:aws:s3:::_<bucket_name>_"
              },
              {
                  "Sid": "TechDocsObjects",
                  "Effect": "Allow",
                  "Action": [
                      "s3:GetObject",
                      "s3:PutObject",
                      "s3:DeleteObject",
                      "s3:DeleteObjectVersion"
                  ],
                  "Resource": "arn:aws:s3:::_<bucket_name>_/*"
              }
          ]
      }

      where

      <bucket_name>
      Specifies the name of your Amazon S3 bucket.
    4. On the Create policy > Specify permissions page, enter a Policy name.
  2. Assign the IAM policy to a new or existing user.
  3. Generate a new access key and a new secret access key.
    Note

    You can use the newly created access keys to generate a TechDocs pipeline with GitHub Actions.

  4. From the OpenShift Container Platform web console, click Topology > Actions > Restart rollout to restart the pod.
    Note

    You must restart the pod to apply the configuration changes.

Results

  • Go to your Amazon S3 bucket to see a set of static site files in your Objects list.