Ad space (banner)
AD

Got the fundamentals? A structured AWS course is a fast way to level up.

Find AWS courses on Udemy

Affiliate link. Costs you nothing extra.

☁️AWS Lessons
Lesson 14 / 41

Checking Attached Policies with aws iam list-attached-role-policies

When you want to know what a role can actually do, use aws iam list-attached-role-policies. It lists the managed policies attached to a role.

The syntax is aws iam list-attached-role-policies --role-name name.

Running it for my-role returns the name and ARN of each attached policy.

A common stumble is forgetting that inline policies exist too, and won't appear here. A role's full permissions are the union of both kinds.

In real work, it is the first thing to check when something gets an "access denied" it shouldn't — or has access it shouldn't.

AWS
Try it (type this into the pseudo terminal)
aws iam list-attached-role-policies --role-name my-role

🧑‍💻 You can type this command into the AWS pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)