Rename an IAM Role

2019-06-17 10:25发布

问题:

I made a typo while creating an IAM role to allow a lambda function to access the cloudwatch logs and to create EC2 volumes snapshots. Is there any way to rename the role, whether by using the console or the AWS CLI ?

回答1:

You cannot edit IAM roles after the role has been created. This is mentioned in several places, including when the role is created through the AIM console.

And in several places in the docs.

For Role name, type a role name to help identify the purpose of this role. Role names must be unique within your AWS account. After you enter the name, click Next Step.

Role names have character limitations. The number of roles in an AWS account and the policy size for policies attached to roles are also limited. For more information, see Limitations on IAM Entities and Objects. Note that you cannot edit the name of the role after it is created.

It is not possible to edit the name via the console or AWS CLI.