Skip to content
IAM Policy Generator

iam:PassRole lets a principal hand a role to a service, so scope it by role name

The iam:PassRole permission lets a user pass an IAM role to an AWS service, which can then act with that role's permissions. AWS says to filter it with the Resource element and the iam:PassedToService condition key. The workbench flags iam:PassRole on Resource "*" as a high-severity finding. AWS documentation read 16 Nov 2026.

Open the workbench ยท All guides

PassRole is how a service gets a role, and a user needs permission to give it

AWS explains that to configure many services you must pass an IAM role to the service, and the service assumes the role later and performs actions on your behalf. For most services you pass the role once during setup. AWS gives the example of an application on an EC2 instance: you pass a role to EC2 when you set up the instance, the role provides the application's temporary credentials, and the application assumes the role each time it acts.

To pass a role, a user must have permission to pass it. AWS says this helps administrators ensure that only approved users can configure a service with a role that grants permissions. The permission is called PassRole and is granted to the IAM user, role or group.

In AWS's service reference of 16 Nov 2026, iam:PassRole is classified as a Write action, one of 190 actions in the IAM service.

A user who can pass a role can use that role's permissions through the service

AWS states the risk plainly. When you set the permission, make sure a user does not pass a role that has more permissions than you want the user to have. AWS gives the example of Alice, who is not allowed to perform any S3 actions: if she could pass a role that allows S3 actions to a service, the service could perform S3 actions on her behalf when it runs the job.

The user's own policy can look small, while the roles that user can pass set the real ceiling. A review that stops at the user's policy and does not list the roles it can pass misses the second half.

Three limits narrow the permission

AWS describes three ways to narrow PassRole, and one that does not work.

MethodWhat AWS says
Resource elementFilter iam:PassRole by role ARN to limit the user to approved roles, for example arn:aws:iam::111122223333:role/EC2-roles-for-XYZ-*.
iam:PassedToService condition keySpecifies the service principal of the service to which a role can be passed.
Add iam:GetRoleUsually added so the user can get the details of the role to be passed.
Tag the role and test ResourceTagAWS says not to do this: using the ResourceTag condition key with iam:PassRole gives unreliable results.

Passing a role has boundaries of account and of service-linked roles

AWS warns that you can only use PassRole to pass a role to a service in the same account. To pass a role from Account A to a service in Account B, create a role in Account B that can assume the role from Account A, and then pass the Account B role to the service.

For service-linked roles, if you name one explicitly you also need permission to pass it. AWS gives the example of EC2 Auto Scaling, which creates the AWSServiceRoleForAutoScaling role the first time you create a group. If you do not name the role, the PassRole permission is not required and the default role is used.

AWS's managed job function policies also grant iam:PassRole, as the job function page explains, and they include filters that limit the names of roles that can be passed. For example, the Network Administrator policy allows passing a role named "flow-logs-vpc" to CloudWatch. If you need the optional service roles, you create roles following the naming convention in the policy.

The workbench flags PassRole on every resource

The workbench checks each Allow statement. If an action pattern expands to iam:PassRole and the Resource is "", it reports that the principal can pass any role, including more privileged ones, to a service, with severity high. The same finding appears when a broad pattern such as iam: or a bare * covers it. The remedy AWS gives is to name the role ARNs or a role name pattern and add iam:PassedToService. The wildcards page shows how many actions a star covers, and the best practices page lists the AWS checks for least privilege.

Sources

  1. Grant a user permissions to pass a role to an AWS service, read 16 Nov 2026
  2. AWS managed policies for job functions, read 16 Nov 2026
  3. AWS service reference information, read 16 Nov 2026

Last reviewed 16 Nov 2026.