Interview Prep/AWS/IAM Advanced, STS and Multi-Account

What does `iam:PassRole` do and why is it dangerous?

AdvancedConceptIAM Advanced, STS and Multi-Account
Answer

iam:PassRole is the permission to hand a role to an AWS service (an EC2 instance, a Lambda function, an ECS task, CloudFormation). It is not an API call; it is checked when you call another API like lambda:CreateFunction --role.

If a user can pass an admin role to a service they can create, they effectively get admin through that service. Scope it with the Resource (specific role ARNs) and the iam:PassedToService condition.

aws All AWS questions Roadmap: AWS core services

More on IAM Advanced, STS and Multi-Account