My scenario is as follows: I have a single server and multiple clients, which communicate via AWS S3 buckets in the following way:
- Clients upload files to an Upload bucket, which the server then reads.
- The server uploads files to a Download bucket, and the client, to which a file is destined, reads it.
Assume each client is monitoring its folder in the Download bucket, so it “knows” when a relevant file is available for downloading.
The access policy I’m trying to apply is as follows:
- Clients can only write to the Upload bucket. They cannot list it contents or read files from it (not even the ones they uploaded).
- Clients can only read from the Download bucket (they can also list the contents of the bucket). They cannot modify the Download bucket’s contents in any way.
- The server can read and write anything in both buckets.
Since the number of clients is virtually unlimited, I assume they all share the same AWS credentials and there is no client-specific authorization (this is handled elsewhere using tokens and is based on the write-only bucket access).
I’ve tried to apply the above using both user policies and bucket policies, using examples available online, but the clients seem to always have full access to the bucket, so I’m probably missing something major.
Is the above scenario possible, and if so – how?