> For the complete documentation index, see [llms.txt](https://docs.norrnext.com/norrcompetition/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.norrnext.com/norrcompetition/remote-storage/aws-s3.md).

# AWS S3

Setting up Amazon Web Services (AWS) S3 remote storage for NorrCompetition.

**Flysystem - AWS S3 for NorrCompetition** (`plg_flysystem_ncaws`) enables direct media synchronization between NorrCompetition and Amazon Web Services Simple Storage Service (S3).

***

### Part 1: Amazon Web Services Setup

#### 1.1. Create a Dedicated IAM User

For optimal security, create a dedicated IAM user with programmatic access rather than using root AWS credentials:

1. Sign in to the **AWS Management Console** and navigate to **IAM (Identity and Access Management)**.
2. Go to **Users > Create User**.
3. Set a user name (e.g. `norrcompetition-s3-user`).
4. In **Attach policies directly**, attach the policy `AmazonS3FullAccess` or create a custom least-privilege policy restricted to your target bucket.
5. In the user details, navigate to the **Security credentials** tab, click **Create access key**, and select **Application running outside AWS**.
6. Copy both the **Access Key ID** and **Secret Access Key** (save them securely).

#### 1.2. Create an S3 Bucket

1. Open the **Amazon S3 Console** and click **Create bucket**.
2. **Bucket Name**: Enter a globally unique bucket name (e.g. `my-nc-uploads`).
3. **AWS Region**: Select the region closest to your server or audience (e.g. `eu-central-1` Frankfurt or `us-east-1` N. Virginia).
4. **Block Public Access settings**: If images need to be served directly from S3 or CloudFront publicly, adjust public access settings according to your asset delivery model.
5. Click **Create bucket**.

#### 1.3. Configure S3 Bucket Policy (Public Read)

If you serve images directly from S3 without an authenticated reverse proxy or signed URLs, grant public read permissions by navigating to **Bucket > Permissions > Bucket Policy** and entering:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowPublicRead",
      "Effect": "Allow",
      "Principal": "*",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"
    }
  ]
}
```

{% hint style="warning" %}
Replace `YOUR-BUCKET-NAME` with your actual S3 bucket name.
{% endhint %}

***

### Part 2: Plugin Configuration

1. Install the `plg_flysystem_ncaws` package via **System > Install > Extensions**.
2. Navigate to **System > Plugins** and open **Flysystem - AWS S3 for NorrCompetition**.
3. Configure the plugin parameters as described below:

| Parameter             | Type            | Required | Description                                                                                                                                            |
| --------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Access Key ID**     | Text            | Yes      | The AWS Access Key ID for your IAM user.                                                                                                               |
| **Secret Access Key** | Text / Password | Yes      | The secret access key associated with your IAM user.                                                                                                   |
| **Bucket**            | Text            | Yes      | The unique name of your AWS S3 bucket.                                                                                                                 |
| **Prefix (folder)**   | Text            | No       | Optional subfolder path within your bucket where files should be placed (e.g. `uploads` or `media/nc`). Leave blank to store files in the bucket root. |
| **Region**            | Dropdown        | Yes      | AWS region hosting your bucket (e.g. `US East (N. Virginia)`, `EU (Frankfurt)`, `EU (Ireland)`, `Asia Pacific (Tokyo)`).                               |
| **Storage Class**     | Dropdown        | Yes      | Select `Standard` (recommended for active assets) or `Reduced Redundancy`.                                                                             |

4. Enable the plugin and save your settings.
5. In **NorrCompetition > Options > General**, set **Storage Handler** to your configured AWS S3 handler to begin synchronizing uploads.
