- 임의 접근 불가하도록 설정하는 방법


S3 버킷 선택 -> 권한 -> 버킷 정책

{
  "Version":"2012-10-17",
  "Id":"http referer policy example",
  "Statement":[
    {
      "Sid":"Allow get requests originating from www.example.com and example.com.",
      "Effect":"Allow",
      "Principal":"*",
      "Action":"s3:GetObject",
      "Resource":"arn:aws:s3:::examplebucket/*",
      "Condition":{
        "StringLike":{"aws:Referer":["http://www.example.com/*","http://example.com/*"]}
      }
    }
  ]
}


//=============================
// 참고
특정 HTTP 참조자에 대한 액세스 제한
https://docs.aws.amazon.com/ko_kr/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-4


Posted by 코덴스
TAG ,

댓글을 달아 주세요