I'm trying to figure out a way to grant Open/Download permissions to files that users upload to a bucket of mine. I was reading this: amazon S3 bucket policy - restricting access by referer BUT not restricting if urls are generated via query string authentication, and used it to implement referral based downloads, but what I'm trying to do is: User A uploads a file, only User A and root can access said file. User B uploads a file, only User B and root can access said file.
I'm already adding an account ID to the metadata of each file. Is it possible to use that for authentication? Run an if($s3->get_object_metadata('account_id', $file))=='123'{provide access}?