Reputation: 839
Here is my json rule:
{
"Statement": [
{
"Sid": "Stmt14xxxxxxxxxx7",
"Action": "s3:*",
"Principal": "arn:aws:iam::xxxxxxxxxx:user/me",
"Effect": "Allow",
"Resource": "arn:aws:s3:::mybucket/*"
}
]
}
I have used the arn:aws:iam
code that is I have downloaded from IAM credendial report. But neither my :root
or my user/me
does work. It's like my arn:aws:iam
code is not valid... The validation window tells Principal value is invalid - xxxxxxxxxx:user/me
Does anyone have already had this issue?
Upvotes: 1
Views: 1070
Reputation: 839
I found the problem: I simply needed to put
"Principal": {
"AWS": [
"arn:aws:iam::xxxxxxxxxxxxx:root"
]
},
I do not understand why the previous was not a valid principal, I guess because of the "AWS:"
part.
Upvotes: 2