Setting up Amazon S3 for Better Storage

Started by admin, Oct 21, 2026, 08:08 AM

Previous topic - Next topic

admin

Setting Up Amazon S3 for Better Storage

Better Storage can store files on your local server or in an Amazon S3 bucket.

This guide walks you through creating a private S3 bucket, creating credentials that Better Storage can use, connecting the bucket, and choosing which Better SMF features should use S3.

You do not need to make your bucket public.

Better Storage is designed to work with private S3 objects and can generate temporary signed download links when files need to be accessed.




Step 1 — Create your Amazon S3 bucket

Sign in to the AWS Management Console, open Amazon S3, choose General purpose buckets, and click:

Create bucket

Choose a bucket name.

Bucket names must be globally unique.

Examples:

myforum-storage
mydomain-smf-storage

Tip: I recommend avoiding periods in the bucket name.

Next, choose the AWS Region where you want the bucket located.

Examples:

us-east-1
us-east-2
us-west-1
us-west-2

Write down the exact Region you select.

Better Storage will need it later.

Leave Object Ownership at its normal default:

Bucket owner enforced

Leave:

Block all public access

ENABLED

You do not need to make the bucket public for Better Storage.

You can normally leave the remaining options at their defaults and click:

Create bucket




Step 2 — Create an IAM user for Better Storage

Do not use your AWS root account access keys.

Open IAM in the AWS Console.

Go to:

IAM
→ Users
→ Create user

Give the user an obvious name such as:

better-storage

This account does not need AWS Console login access.

It only needs permission to work with the S3 bucket.

Create the user.




Step 3 — Give Better Storage access to only its bucket

Open your new better-storage IAM user and add an inline permissions policy.

A good Better Storage policy looks like this:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "BetterStorageBucket",
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::YOUR-BUCKET-NAME"
      ]
    },
    {
      "Sid": "BetterStorageObjects",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:DeleteObject"
      ],
      "Resource": [
        "arn:aws:s3:::YOUR-BUCKET-NAME/*"
      ]
    }
  ]
}

Replace:

YOUR-BUCKET-NAME

with the actual name of the bucket you created.

For example:

arn:aws:s3:::myforum-storage

and:

arn:aws:s3:::myforum-storage/*

Better Storage needs:

s3:ListBucket

to verify that it can reach the bucket.

It uses:

s3:GetObject
s3:PutObject
s3:DeleteObject

to manage the files stored inside the bucket.

You do not need to give this user full AmazonS3FullAccess permissions.




Step 4 — Create an Access Key

Open:

IAM
→ Users
→ better-storage
→ Security credentials

Scroll down to:

Access keys

and click:

Create access key

AWS may show an Access key best practices & alternatives screen.

Because Better Storage is a server application connecting directly to S3, choose the applicable application use case or Other if shown.

Create the key.

AWS will give you two values:

Access key ID
Secret access key

Save both somewhere secure.

AWS only displays the Secret Access Key when the key is created.

If you lose it, you must create a replacement key.

Never post your Access Key ID or Secret Access Key publicly.




Step 5 — Open Better Storage

In your SMF Administration Center go to:

Administration Center
→ Configuration
→ Better Storage

Open the Better Storage settings page.

Under Amazon S3 Connection, you will see the S3 configuration fields.




Step 6 — Enter your AWS settings

AWS region

Enter the exact region selected when creating your bucket.

Example:

us-east-1


S3 bucket

Enter only the bucket name.

Example:

myforum-storage

Do not enter:

https://...

or:

s3://...

Just enter the bucket name.


Shared root prefix — optional

This lets you place everything Better Storage manages underneath one folder-like prefix inside the bucket.

Example:

bettersmf

You may also leave this blank.

You do not have to manually create the prefix in S3.


Access key ID

Paste the IAM user's Access Key ID.


Secret access key

Paste the matching Secret Access Key.


Custom S3 endpoint — optional

For normal Amazon AWS S3:

LEAVE THIS BLANK

This setting is mainly for other S3-compatible storage providers.


Private objects

Leave this:

CHECKED

This is the recommended setup.




Step 7 — Test the connection

Before saving everything, click:

Test Connection

A successful test should report something similar to:

QuoteConnection successful. Better Storage can reach and authenticate with this S3 bucket.

A successful test confirms that:

  • the bucket name is correct
  • the AWS Region is correct
  • the Access Key ID is valid
  • the Secret Access Key is valid
  • the IAM user has permission to access the bucket

After a successful test, click:

Save

Important: Testing the connection does not permanently save your settings.




Step 8 — Choose what should use S3

Once your S3 connection is configured, Better Storage lets supported integrations choose their storage backend individually.

Depending on which Better SMF packages you have installed, you may see integrations such as:

  • Better Gallery
  • Better Downloads
  • Forum Attachments
  • Better PM Attachments
  • Better Chat

Each integration can normally be assigned to:

Local server

or:

Amazon S3

You do not have to move everything to S3 at once.

For example:

Forum Attachments → Local server
Better Gallery → Amazon S3
Better PM Attachments → Amazon S3

You can switch the others later if you want.




Step 9 — Test with a real file

After routing one integration to Amazon S3, upload a small test file through that feature.

Then open your AWS S3 bucket.

You should see Better Storage creating objects underneath the configured prefix.

For example, if you entered:

bettersmf

as your Shared Root Prefix, Better Storage files will be stored beneath that path.

Next go back to:

Better Storage
→ Storage Overview

and confirm that the integration is reporting files stored in:

Amazon S3




Important — Do not manually make your S3 files public

There is normally no reason to disable S3's Block Public Access.

Keep your bucket private.

Better Storage can generate temporary signed URLs when an authorized user needs to access an S3-backed file.

This gives you off-server storage without making your uploads publicly browsable.




Troubleshooting

Test Connection returns 403 or Access Denied

Check your IAM policy.

Make sure:

s3:ListBucket

applies to:

arn:aws:s3:::YOUR-BUCKET-NAME

and:

s3:GetObject
s3:PutObject
s3:DeleteObject

apply to:

arn:aws:s3:::YOUR-BUCKET-NAME/*


Signature or authorization errors

Double-check your AWS Region.

The region entered in Better Storage must match the region where the bucket was created.


Better Storage reports missing S3 settings

Check that you entered:

  • Bucket name
  • AWS Region
  • Access Key ID
  • Secret Access Key


PHP cURL required

Your web server must have the PHP cURL extension enabled.


Uploads fail

Verify the IAM account has:

s3:PutObject


Downloads fail

Verify the IAM account has:

s3:GetObject


Deleted files remain in the S3 bucket

Verify the IAM account has:

s3:DeleteObject




Security Recommendations

  • Never use your AWS root account credentials in Better Storage.
  • Create a dedicated IAM user specifically for Better Storage.
  • Give that user access only to the Better Storage bucket.
  • Keep AWS Block Public Access enabled.
  • Keep Better Storage's Private Objects option enabled.
  • Never post your Access Key ID or Secret Access Key in support topics.
  • If a Secret Access Key is exposed, deactivate or delete it immediately and create a new one.




Quick Setup Checklist

[ ] Create private S3 bucket
[ ] Record the AWS Region
[ ] Leave Block Public Access enabled
[ ] Create dedicated IAM user
[ ] Add the Better Storage bucket policy
[ ] Create Access Key ID + Secret Access Key
[ ] Enter credentials in Better Storage
[ ] Leave Custom Endpoint blank for AWS
[ ] Keep Private Objects checked
[ ] Click Test Connection
[ ] Click Save
[ ] Route one integration to Amazon S3
[ ] Upload a test file
[ ] Confirm it appears in Storage Overview




That's it!

Once the connection test succeeds and your first file appears in the bucket, Better Storage is officially using Amazon S3. 😎
Having trouble? Please contact me through Help & Support Board.