我有一个回形针文本文件附件(在 Rails 中)。
我的存储桶策略是:
{
"Version": "2008-10-17",
"Id": "Policy123",
"Statement": [
{
"Sid": "Stmt123",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": [
"s3:GetObjectVersion",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::my_bucket/*"
}
]
}
我想限制只有当请求来自我的网站时才允许访问这些操作。是否只是将其更新为: "Principal": {"AWS": "mywebsite.com"} 的情况?