Sallymelek Hi, yes, I do agree, although for this to work, you’d need to be familiar with the AWS CLI - which can in itself be quite daunting. It’s very much the same as this
In my opinion, you’d be better off leveraging IAM (Identity Access Management), creating a user to access the S3 bucket only, and create an access policy that permits just that. I’d review this document first as it provides a reasonable scope of the work required, and detailed steps of how to get there.
Overall, as powerful as AWS is, it can be extremely confusing - and challenging to setup if you are not familiar with the process. If you are only looking to store images, then a quicker and less complex way to do this would be with IMGUR - there are also a good number of extensions for Flarum that enable such functionality - one of which is here
As a final topic, I’m curious as to why you aren’t hosting these images yourself on your own server ?