You should not open the bucket for public recording, probably. You are open to many attacks and should carefully monitor your log files, etc.
The best solution would be to keep the default personal access in the bucket, and then create an IAM user who has only download permissions (and possibly downloads) for the required area. Then, when someone wants to upload a file, you can use the call to your server with IAM keys to calculate and return a βpre-signed messageβ that will allow your client application to host a new file on the server. Then you can use any auth tool that you want on your server to decide whether to allow or block someone from downloading, including without authorization - but to detect abuse. When you do this, the secret key for the IAM user is never sent to the client, which may be in a debugging session, etc.
Since all mail is pre-signed, you can also decide where the file is allowed, the name of the downloaded file, etc. and return it to the server response.
Tom andersen
source share