I have an S3 bucket my-bucket
and an object in that bucket my-image.jpg
In order to display these images in a website, directly out of S3, I've put this bucket policy on my-bucket
:
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
}
]
}
Now, in my website, I can conveniently just do this in my HTML:
<img width="400" height="400"
src="http://ift.tt/1H53JiI">
But what is stopping someone, somewhere, from making their own public my-bucket
, and adding a my-image.jpg
? How will it load the proper image? Does S3 handle this in some way?
note No, these are not the actual bucket names + image names. They are examples.
Aucun commentaire:
Enregistrer un commentaire