When you’re working with the AWS CLI, it’s crucial to understand what permissions your active IAM user or role has. In this post, I’ll walk you through how you can list the permissions attached to your active IAM user or role via the AWS CLI. You’ll learn how to identify your current IAM user or role and then use that information to list all the permissions that have been granted.
Before you can find out which policies are attached to your IAM Role or IAM user in the AWS CLI.
In our case we want to find out what permissions and policies are attached to our active IAM role that’s currently active in the AWS CLI.