It might seems a silly question but I'm not able and I haven't find any command to show in the aws CLI the policy body. I have a managed policy attached to a role. I can simply display the ID and other information but not the body. Am I missing anything?
I run
aws iam get-policy --policy-arn <arn>
and get something like:
{
"Policy": {
"PolicyName": "developer_allow",
"CreateDate": "2017-03-28T12:57:11Z",
"AttachmentCount": 1,
"IsAttachable": true,
"PolicyId": "XXXXXXXXXXXXXXXXXXXXX",
"DefaultVersionId": "v1",
"Path": "/",
"Arn": "arn:aws:iam::xxxxxxxxxxx:policy/developer_allow",
"UpdateDate": "2017-03-28T12:57:11Z"
}
}
It was slightly more complicated but here the command:
aws iam get-policy-version --policy-arn arn:aws:iam::XXXXXXXXXXXXXXX:policy/developer_allow --version-id v1
You need to specify the version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With