AWS Security ChangesHomeSearch

AWS IAM documentation change

Service: IAM · 2025-06-25 · Documentation low

File: IAM/latest/UserGuide/iam_example_iam_DetachRolePolicy_section.md

Summary

Added PowerShell V5 examples for detaching role policies including bulk removal

Security assessment

Standard policy management examples without evidence of addressing specific security vulnerabilities

Diff

diff --git a/IAM/latest/UserGuide/iam_example_iam_DetachRolePolicy_section.md b/IAM/latest/UserGuide/iam_example_iam_DetachRolePolicy_section.md
index de6ba3568..3689f1dbf 100644
--- a//IAM/latest/UserGuide/iam_example_iam_DetachRolePolicy_section.md
+++ b//IAM/latest/UserGuide/iam_example_iam_DetachRolePolicy_section.md
@@ -492,0 +493,20 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example detaches the managed group policy whose ARN is`arn:aws:iam::123456789012:policy/FederatedTesterAccessPolicy` from the role named `FedTesterRole`.**
+    
+    
+    Unregister-IAMRolePolicy -RoleName FedTesterRole -PolicyArn arn:aws:iam::123456789012:policy/FederatedTesterAccessPolicy
+    
+
+**Example 2: This example finds all of the managed policies that are attached to the role named`FedTesterRole` and detaches them from the role.**
+    
+    
+    Get-IAMAttachedRolePolicyList -RoleName FedTesterRole | Unregister-IAMRolePolicy -Rolename FedTesterRole
+    
+
+  * For API details, see [DetachRolePolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+