My issue is that for security I don’t have the s3:ListAllMyBuckets permission (as I can only see one bucket), but not list them. Craft needs this to function, so I need to manually force the list of one bucket.
I am trying to override the output of class S3AssetSourceType->getBucketList from a plugin (in Craft 2) to return my own list.
In Craft 3 I’d create my own AssetSource. I guess I’m going to need to amend the core (I know very bad), but I think its the only option I have at this stage (unless anyone has a bright idea). We won’t allow updates via the CMS, so I could write a unit test to check the output is as I have amended it after any core updates. Also, I’d assume that S3AssetSourceType won’t be edited much in Craft 2.
Not an ideal solution, but its the only way I can think of doing it. I have tried every other workaround I can think about (before editing the core code). I looked at mounting the filesystem using s3fs-fuse on Ubuntu, but Docker won’t allow it in our setup.
Anyway, any help would be much appreciated before I start hacking away… thanks.