aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::IAM::Role requiring iam:UpdateRoleDescription to update role description

Open
#1,923 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::IAM::Role

### Resource Name

AWS::IAM::Role

### Issue Description

Via the IAM console, you can change a role's description with just the **iam:UpdateRole** permission.

However, updating the description of a role created via CloudFormation requires **iam:UpdateRoleDescription**.

According to the IAM documentation [1], use **UpdateRole** instead of **UpdateRoleDescription**

Why is there a difference in these behavior and does it not follow IAM documentation?

[1] https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateRoleDescription.html

### Expected Behavior

CloudFormation uses **UpdateRole**

### Observed Behavior

CloudFormation uses **UpdateRoleDescription**

### Test Cases

**Create**
```
Resources:
Role:
Type: AWS::IAM::Role
Properties:
Description: "my description"
AssumeRolePolicyDocument: !Sub |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:sts::${AWS::AccountId}:assumed-role/Admin/email1@test.com"
]
},
"Action": "sts:AssumeRole"
}
]
}
```

**Update**
```
Resources:
Role:
Type: AWS::IAM::Role
Properties:
Description: "my new description"
AssumeRolePolicyDocument: !Sub |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:sts::${AWS::AccountId}:assumed-role/Admin/email1@test.com"
]
},
"Action": "sts:AssumeRole"
}
]
}
```

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked IAM UpdateRoleDescription documentation and reproduce the Create and Update templates in the issue. Confirm which permission CloudFormation requests when changing AWS::IAM::Role.Description; done means the observed permission behavior matches the documented IAM operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.