My web app uses Amazon S3 to store all the media files in my djagno web app with the help of the django-storages 3rd party app.

My db handle the folder and files hierarchy and each user see just the links that belongs to his group.

But! there is no permissions to the other folders at S3.

for example:
user 1 : group is group1
user 2: group is group2
s3 link: <https://s3.amazonaws.com/>/media/group1/folder1/1.png 

user 1 will see this at his page inside the app.
user 2 won't see this link, but if he tried to get to this link, there is no permissions on the file and it will be downloaded easily.

My goal is to restrict folder permission to each group.

There is automatically solution that based on my aws keys?
I'm lost...