Q: Integrating Symfony3 & AWS S3 with user permissions I know there is likely to be documentation out there somewhere but I have been drowning in Google searches trying to get my head around this!
I am working on my first Symfony project and I have a requirement to store files on AWS S3.  There are three categories of file I am storing:


*

*Type 1 - This should be accessible to anyone (although only on a request from my website).

*Type 2 - This should be accessible to certain users.  The list of users will change from time to time (friends list).

*Type 3 - This should be accessible to the creating user and at times other users when accessed from a specific page.


I user the FOSUserBundle to handle my user authentication in my project.
At this time I'm lost in a sea of "IAM" users, "ACL" policies and I really don't know how to set something like this up - or if it's even possible.  I also have the Gaufrette and liip/imagine-bundle bundles installed in Symfony (so I could add watermarks and resize)
Any help or resources that would point me in the right direction would be grateful.
t2t
Edit (21st Feb 2017
OK, so based on my further reading and the comment below I believe I can simplify what I need to do:
I want to have a bucket on AWS S3 which is restricted so that:


*

*Files can only be read by a request from my domain, that provides a security token of some sort.


That will mean that even if the HTTP referred is spoofed a request to the S3 file will be declined as the token was not sent...
So, the question is - is this possible?  If so, how should I proceed?
Thanks,
t2t

A: Please do not mix your project users with IAM users. Those things are completely separated. You need only one IAM user, which will upload files of all users of your PHP app. Any logic should be written in Symfony.
