开发者

s3 Bucket Policy Malformed error

The following bucket policy is returning a malformed error:

{
"Version": "2008-10-17",
"Id":"S3Policy",
"Statement":[
{
"Sid":"1",
"Effect": "Allow",
"Principal": {
"AWS": ["AWSID"开发者_C百科]
},
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::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?


I think you mixed up the parenthesis.

Try this:

{
    "Version": "2008-10-17",
    "Id": "S3Policy",
    "Statement": [
        {
            "Sid": "1",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "AWSID" 
                ] 
            },
            "Action": [
                "s3:GetObject",
                "s3:PutObject" 
            ],
            "Resource": "arn:aws:s3:::BUCKETNAME/*" 
        } 
    ]
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜