Amazon s3 bucket policies restrict access has no effect -


i want restrict access file in amazon s3 public except sites (using referer),
have bucket policies

{ "id":"foosite-test", "statement":[   {      "sid": "allow foosite admin",      "action": "s3:getobject",      "effect": "allow",      "resource": "arn:aws:s3:::mybucket/*",      "principal": {         "aws":["*"]      },      "condition": {         "stringlike": {                "aws:referer": [               "http://www.foosite.co.uk/admin/*",               "http://www.foosite.co.au/admin/*"            ]         }      }   }   ] } 

but seems policy doesn't have effect. can copy paste s3 object url , still can access file. what's wrong policies?

you need add policy deny also, block other referer. had answered similar question, did not included deny part in sample policy. can find updated answer here: amazon s3 objects: possible restrict public read policy ip adresses ?

in case have use referer instead of ip.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -