gpt4 book ai didi

django - s3 IAM 用户 django-storages 需要哪些权限?

转载 作者:行者123 更新时间:2023-12-04 01:00:49 26 4
gpt4 key购买 nike

正如问题所问,锁定的 s3 IAM 用户成功使用 django-storages 所需的最低权限是多少?目前我已经使用了类似的东西

{
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListAllMyBuckets"],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": ["s3:ListBucket",
"s3:GetBucketLocation",
"s3:ListBucketMultipartUploads",
"s3:ListBucketVersions"],
"Resource": "arn:aws:s3:::bucket-name"
},
{
"Effect": "Allow",
"Action": ["s3:*Object*",
"s3:ListMultipartUploadParts",
"s3:AbortMultipartUpload"],
"Resource": "arn:aws:s3:::bucket-name/*"
}
]
}

这实际上可能是矫枉过正。任何进一步的想法?

最佳答案

Fiver的回答不够跑collectstaticdjango-storages .我什么都用过了 @jvc26除了 s3:ListAllMyBuckets .我假设 s3:ListBucketVersions也不需要。

{
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket",
"s3:GetBucketLocation",
"s3:ListBucketMultipartUploads",
"s3:ListBucketVersions"],
"Resource": "arn:aws:s3:::bucket-name"
},
{
"Effect": "Allow",
"Action": ["s3:*Object*",
"s3:ListMultipartUploadParts",
"s3:AbortMultipartUpload"],
"Resource": "arn:aws:s3:::bucket-name/*"
}
]
}

关于django - s3 IAM 用户 django-storages 需要哪些权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12961910/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com