I am new to AWS, but from my understanding a role contains both a permissions policy and a trust policy. The permissions policy seems pretty straight forward - What you can do. IE:
"iam:CreatePolicy",
"iam:GetRole",
"iam:GetPolicy",
"iam:DeletePolicy",
"iam:CreateRole",
"iam:DeleteRole",
...
The trust policy on the other hand is the "who is allowed to do it" IE:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::000000000000:role/My-Role"
},
**"Action": "sts:AssumeRole"**
}
]
}
AssumeRole sounds like a "What you can do", so why does it always belong in the trust policy and not the permissions policy. Going off that, I've learned that sts:TagSession also belongs in the Trust policy and not the permissions policy. Am I missing something or is it simply sts type actions belong in the trust policy?