I am planning on using Amazon S3 to let users upload photos from an iPhone and then let them be publicly viewable.
I am having some trouble understanding how to set up these security constraints in the bucket policy:
- Everyone can read every file.
- Everyone can upload a new file that is maximum 256K large.
- No one can delete any file.
- No one can modify any file.
Perhaps something like the one below will work, but I am not sure you can restrict the upload size.
Ok I sort of worked it out in the end. The only thing is that you can't set different permissions on adding files and updating files. They are all covered by s3:PutObject. Also, it doesn't seem possible to restrict file size.