Based on this tutorial from Minio I implemented a similar integration with DreamObjects. The WP Offload Media Tweaks plug-in must be installed then hacked on. The file includes examples directly in the code and commented out, including minio examples.
I referenced the DreamObjects S3 API docs and came up with these example integrations. On Dreamhost you can edit files directly using the "Manage files" when from the Dreamhost panel. Beware - you can easily "white screen" your WordPress with bad syntax so keep a backup.