I have created a custom IAM policy, now I'm trying to rename it but I cannot find an option for it. The policy was not attached to anything yet. Is it possible to rename it or should I create a new policy with the correct name and delete the old one?
2 Answers
No, you cannot rename your custom policy. Only alternative:
- Copy policy
- Create a new policy with the new name and paste the policy
- Delete the old policy
You can now do it using the AWS command line tool with the update-policy
aws organizations update-policy \
--policy-id p-examplepolicyid111 \
--name Renamed-Policy \
--description "This description replaces the original."
-
4Finding to policy id wasn't obvious to me. So I used get_policy first:
aws iam get-policy --policy-arn <my-policy-arn>
– JanNov 18, 2021 at 10:36 -
3This is about updating
organizations
policies, which are a completely different thing. The poster asked aboutiam
policies– KutziMay 10, 2022 at 10:05