Drupal 7我需要替换文件系统中的图像,并且还需要替换S3存储桶而不更改S3上的图像网址。
我正在使用s3fs模块通过S3上传图片。
答案 0 :(得分:1)
在确保存储桶拥有者完全控制的同时授予上传对象的跨帐户权限
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"111",
"Effect":"Allow",
"Principal":{"AWS":"1111111111"},
"Action":"s3:PutObject",
"Resource":"arn:aws:s3:::examplebucket/*"
},
{
"Sid":"112",
"Effect":"Deny",
"Principal":{"AWS":"1111111111" },
"Action":"s3:PutObject",
"Resource":"arn:aws:s3:::examplebucket/*",
"Condition": {
"StringNotEquals": {"s3:x-amz-grant-full-control":["emailAddress=xyz@amazon.com"]}
}
}
]
}
有关详情,请查看Granting Cross-Account Permissions to Upload Objects