使用AWS S3的存储桶策略,是否可以强制上传的文件(PutObject)具有文件扩展名“.txt”?如果是这样,那个存储桶策略会是什么样子?
答案 0 :(得分:3)
这样的事情:
{
"Version":"2008-10-17",
"Statement": [
{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": { "AWS": "arn:aws:iam::111122223333:root" },
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::bucket/*.txt"
}
]
}