Get a Policy Version Document

Prerequisites

  • An IAM account with an active Storage Account Owner session credentials (or admin access).

  • An existing policy created with ARN <POLICY_ARN>.

Procedure

A new policy version is automatically created when you edit a policy in the UI.

aws iam get-policy-version --policy-arn <POLICY_ARN>
{
    "PolicyVersion": {
        "CreateDate": "2015-06-17T19:23;32Z",
        "VersionId": "v2",
        "Document": {
                    "Version": "2012-10-17",
                    "Statement": [
                        {
                                "Action": "iam:*",
                                "Resource": "*",
                                "Effect": "Allow"
                        }
                    ]
                }
        "IsDefaultVersion": "false"
    }
}

Post-checks

The returned policy document must match the document provided when creating the policy version.