The S3 plugin is a bit strange as there are a few variants as a lot of them appear to be forked and then abandoned again.
We were originally going to look at redeveloping our own plugin but found this one worked for our needs and still works in the latest version:
nodebb-plugin-s3-uploads-updated-again
A plugin for NodeBB to take file uploads and store them on S3 updated for nodebb 1.17+. Latest version: 0.4.0, last published: 3 years ago. Start using nodebb-plugin-s3-uploads-updated-again in your project by running `npm i nodebb-plugin-s3-uploads-updated-again`. There are no other projects in the npm registry using nodebb-plugin-s3-uploads-updated-again.
npm (www.npmjs.com)