Cant Use S3 Storage

Hi all,

I’m using MM v5.0.1. I’m trying to setup S3 bucket storage.

I’ve created a S3 bucket and a IAM role to give read/write permissions.

I can access the storage in the server.

Then I try to setup S3 in MM but test connection always fails.

It returns “Connection Unsuccessful:S3 Bucket is required - undefined”

What’s does it mean?


Hi @RbDev! Would you be able to share your config settings for S3?

I’m using admin console >> storage.
Enabled type Amazon S3, typed the bucket name and pressed test connection.
Are there settings required in the config?

Hi @RbDev! Can you help take a look at step 6 on this doc to see if it helps, e.g. there is a note about having enough free space:

Can you also help take a look at this thread with some tips for troubleshooting:

If these don’t help, just let me know and I’ll ask an engineer to continue to troubleshoot.

1 Like

The first link doesn’t help. it lacks important steps. I think processes like setting up S3 storage must be well documented on

If you store the files on Amazon S3, set File Storage System to Amazon S3 and enter the appropriate values for your Amazon account.

The second link seems to be a different issue.

The s3 test error I keep getting is the following

{“level”:“error”,“ts”:1531504348.024893,“caller”:“web/handlers.go:140”,“msg”:“S3 Bucket is required”,“path”:"/api/v4/file/s3_test",“request_id”:“hbcgfgtofighxdyy9aanjo9uac”,“ip_addr”:“XX.XX.XX.XX”,“user_id”:“m8fp1td76tbi5ctaonm5tm5zko”,“method”:“POST”,“err_where”:“S3File”,“http_code”:400,“err_details”:""}

@jespino Would you know what might be causing issues with setting up S3 bucket storage?


RbDev has created an S3 bucket and a IAM role to give read/write permissions but he gets an error saying “Connection Unsuccessful:S3 Bucket is required - undefined”. This is the full error:

{“level”:“error”,“ts”:1531504348.024893,“caller”:“web/handlers.go:140”,“msg”:“S3 Bucket is required”,“path”:"/api/v4/file/s3_test",“request_id”:“hbcgfgtofighxdyy9aanjo9uac”,“ip_addr”:“XX.XX.XX.XX”,“user_id”:“m8fp1td76tbi5ctaonm5tm5zko”,“method”:“POST”,“err_where”:“S3File”,“http_code”:400,“err_details”:""}

1 Like

Hi @RbDev, could you configure S3, save all changes, and then click the “Test button”? The test button now is working with the already saved configuration. It’s a bug, that must be solved, but for now the “save and then test” approach should work.

1 Like

ok I did save first and ran the test later and it returned sucessful.

further I tried to upload a file and during the progress bar animation I get a “there apears to be a problem with your internet connection.”

Going to the s3 repo I can see the file is there.

Any ideas.

question: does using S3 redirects all file upload and download to amazon servers?

I need instructions to properly configure s3 bucket permissions so that it can allow mm clients to upload and download files.

any chance to have help with this setup?

I’m still unable to use S3.

Hi @RbDev! Apologies for late reply.

Are you seeing any errors in logs?

Were you attempting to make a post with the file?

Also, if you encounter crashing issues with S3 file uploads, we have an open ticket for a fix:

all the info is already in this thread

Hi @RbDev - I checked with our developers about this and they said that the error messages you are getting mean that the setting AmazonS3Bucket in your config.json is not set. Can you help set that setting?

That’s not how it should work.
The user doesn’t have to guess how to do something in mattermost.
There should be instructions available in documents website for everybody to see.
Ask the devs to send clear instructions how to create a s3 bucket for mm and how to configure mm to access it.
and please place them on documents websites.

@RbDev I agree, thanks for the feedback - I’ll forward your feedback to the devs and find out how we can improve the documentation on this.

@RbDev, thanks for your feedback and sorry about the issues you’re running into. Setting up S3 /should/ be as easy as filling in the requisite Amazon S3 configuration values, but there’s a couple of known issues that can impact some installations.

You mentioned seeing a message: “There appears to be a problem with your internet connection.” Is this reproducible for every file upload? Can you check your server logs to see if there is a panic or crash when this occurs? If so, you’re likely running into A short-term workaround until that bug is fixed would be to increase the amount of memory on your Mattermost server.

You also asked, “Does using S3 redirects all file upload and download to amazon servers?” Yes: any file uploads and subsequent downloads are handled by Amazon servers. Mattermost will proxy the downloaded file back to the user.

The issue happens all the time. In fact, the MM is unstable returning not found from time to time.

I’ve decided not to use group account between the server and the storage since I cant get it to work.

I’m using a IAM user account with S3FullAccess policy to log in but I’m still getting the same errors.

Admin console storage is set to work with S3 and test connection is returning successful.

Logs don’t report any errors.


Hi @RbDev,

Is this reproducible for every file upload? Can you check your server logs to see if there is a panic or crash when this occurs?

Hi Amy,

I already answer those questions in my previous reply.

Yes. it happens all the time and no log errors are reported.

Do you have DEBUG log messages turned on as this might help with capturing more server log errors?

Debug is selected. I think because it’s a client error, it’s not getting logged.

It must be some sort of permission issue.