How to use S3 bucket as file storage system in Mattermost

For feature requests, please see: http://www.mattermost.org/feature-requests/.

For troubleshooting questions, please post in the following format:

Summary

Unable to connect to s3 bucket
getting an error “Connection unsuccessful: S3 Bucket is required”

Tried Everything and wasn’t able to overcome this.

Can you anyone provide a guide to connecting s3 to mattermost