A SysOps administrator has the following IAM policy attached to their IAM user:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"backup:CreateBackupSelection",
"backup:GetBackupPlan"
],
"Resource": "*"
}
]
}
The administrator is attempting to configure a new backup selection to assign a custom IAM role (`arn:aws:iam::111122223333:role/CustomBackupRole`) to a backup plan. The custom IAM role's trust policy allows `backup.amazonaws.com` to assume it. When trying to save the selection, the administrator receives an Access Denied error.
Which policy update is required to resolve this error?
- AAdd a statement to the administrator's IAM policy that allows the sts:AssumeRole action on the CustomBackupRole resource.
- BUpdate the CustomBackupRole's trust policy to grant the administrator's IAM identity permission to perform the sts:AssumeRole action.
- Add a statement to the administrator's IAM policy that allows the iam:PassRole action targeting the CustomBackupRole ARN as the resource.Answer
- DAdd a Service Control Policy (SCP) at the root level of the organization that allows sts:AssumeRole for the backup.amazonaws.com service principal.
Answer
Add a statement to the administrator's IAM policy that allows the iam:PassRole action targeting the CustomBackupRole ARN as the resource.
To configure an AWS service (such as AWS Backup) to run tasks using a specific IAM role, the user performing the configuration must have permission to pass that role to the service. This is controlled by the iam:PassRole permission, which must be allowed in the administrator's IAM policy targeting the ARN of the custom backup IAM role. This prevents unauthorized users from passing highly privileged roles to services.
Step-by-Step Solution
Key Concept
IAM Role Delegation and the iam:PassRole Permission
Estimated Time:2m 0s