s3fsを使ってこんな感じのバケットポリシーのs3をマウントするときのやつ
(hogehogeバケットとその中身を特定IPアドレスの人に開放する)
{
"Version": "2012-10-17",
"Id": "Policy1509977001523",
"Statement": [
{
"Sid": "Stmt1509976998204",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::hogehoge",
"Condition": {
"IpAddress": {
"aws:SourceIp": "203.0.113.1"
}
}
},
{
"Sid": "Stmt1509976998204",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::hogehoge/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "203.0.113.1"
}
}
}
]
}
んでs3fsはこんな感じ
s3fs -o public_bucket=1,rw,allow_other,umask=0022,endpoint=ap-northeast-1,default_acl=public-read hogehoge /mnt
public_bucketがポイント