Create Policy Versions¶
Prerequisites¶
An IAM account with an active Storage Account Owner session credentials (or admin access).
An existing policy created with
ARN <POLICY_ARN>.
Procedure¶
Note
Remove the optional
--set-as-defaultparameter to create a new policy version without setting it as the default (active) one.The
newPolicy.jsonfile contains the new policy document with new permissions.
Run the following command to create a new policy version in your account.
aws iam create-policy-version --policy-arn <POLICY_ARN> --policy-document file://newPolicy.json --set-as-default
{
"PolicyVersion": {
"CreateDate": "2022-01-01T12:56:03.721Z",
"VersionId": "v2",
"IsDefaultVersion": true
}
}
Post-checks¶
Check that the IAM Policy is successfully created and set as default
by using either the get-policy or the get-policy-version API
with the policy ARN used above.
Ensure that:
The default version is the same as the version of the created policy.
The attached policy document is the same as the one you sent to ARTESCA.
Note
When you edit a policy in the UI, it creates a new policy version which becomes the default one. A policy can only have 5 versions. If you edit a policy that already has 5 versions, the oldest version is automatically deleted.

