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/*"
}
]
}
精彩评论