s3存储桶策略格式错误 [英] s3 Bucket Policy Malformed error
本文介绍了s3存储桶策略格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下存储桶策略返回格式错误的错误:
The following bucket policy is returning a malformed error:
{
"Version": "2008-10-17",
"Id":"S3Policy",
"Statement":[
{
"Sid":"1",
"Effect": "Allow",
"Principal": {
"AWS": ["AWSID"]
},
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::BUCKETNAME/*"
]
}
}
我正在尝试创建一个策略,用户AWSID(我知道可以使用的65个字符的十六进制ID)可以读取/写入BUCKETNAME中的所有文件.
I'm trying to create a policy where all files within BUCKETNAME will be readable/writable by the user AWSID -- a 65 character hex ID that I know works.
有什么主意会导致错误返回吗?
Any ideas what specifically is returning the error?
推荐答案
我认为您混淆了括号.
尝试一下:
{
"Version": "2008-10-17",
"Id": "S3Policy",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Principal": {
"AWS": [
"AWSID"
]
},
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::BUCKETNAME/*"
}
]
}
这篇关于s3存储桶策略格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文