1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
I think what you want to do can be achieved with IAM Access Analyzer.
As explained in the following AWS blog, you can identify unused actions from the IAM policy set for the IAM role.
https://aws.amazon.com/blogs/aws/iam-access-analyzer-updates-find-unused-access-check-policies-before-deployment/
Please note that this feature is paid and costs $0.20 per IAM user or IAM role inspected.
https://aws.amazon.com/iam/access-analyzer/pricing/
$0.20 /IAM role or user analyzed/month
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago

" you can identify unused actions from the IAM policy set for the IAM role." --> Can you target a specific arn to run the analyzer against? From what I can see the unused analyser runs on the entire account rather than a specific role.
As you may be aware, by default all roles and IAM users are scanned. There is a setting to exclude IAM roles and IAM policies with specific tags from scanning, so you can set tags for IAM users and IAM roles that you do not want to scan, allowing you to scan only specific IAM roles. https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-create-unused.html?icmpid=docs_iam_help_panel