반응형
AWS S3 서비스를 이용할때 해당 리소스를 아무곳에서나 볼 수 있으면 안되기 때문에
저렇게 해주면 www.example.com 과 xxx.xxx.xxx.xx ip 에서만 접근이 가능하다.
{
"Version": "2012-10-17",
"Id": "http referer policy example",
"Statement": [
{
"Sid": "Allow get requests originated from www.example.com and example.com",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::버킷이름/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"http://www.example.com/*",
"http://example.com/*"
]
},
"IpAddress": {
"aws:SourceIp": "xxx.xxx.xxx.xx/0"
}
}
}
]
}
반응형
'컴퓨터관련' 카테고리의 다른 글
AWS S3 Uploader Progress 이용하여 uploading 하기 (0) | 2017.01.27 |
---|---|
JAVA를 이용하여 디렉토리에 있는 이미지를 PDF로 만들기 (0) | 2017.01.17 |
Jquery 동일한 클래스에서 원하는 값만 뽑아오기 (0) | 2017.01.11 |
Jquery 비어있는 항목에 일괄 값 적용시키기 (0) | 2017.01.10 |
jquery datepicker 동적으로 처리하기 (0) | 2017.01.10 |