AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-06-28 · Documentation low

File: code-library/latest/ug/iam_example_iam_ListAttachedRolePolicies_section.md

Summary

Added PowerShell V5 example for ListAttachedRolePolicies command with sample output and API reference

Security assessment

The example shows standard role policy listing without any security-specific context or vulnerability mitigation.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_ListAttachedRolePolicies_section.md b/code-library/latest/ug/iam_example_iam_ListAttachedRolePolicies_section.md
index 627e06fb2..fc3cb41c1 100644
--- a//code-library/latest/ug/iam_example_iam_ListAttachedRolePolicies_section.md
+++ b//code-library/latest/ug/iam_example_iam_ListAttachedRolePolicies_section.md
@@ -251,0 +252,21 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This command returns the names and ARNs of the managed policies attached to the IAM role named`SecurityAuditRole` in the AWS account. To see the list of inline policies that are embedded in the role, use the `Get-IAMRolePolicyList` command.**
+    
+    
+    Get-IAMAttachedRolePolicyList -RoleName "SecurityAuditRole"
+    
+
+**Output:**
+    
+    
+    PolicyArn                                                 PolicyName
+    ---------                                                 ----------
+    arn:aws:iam::aws:policy/SecurityAudit                     SecurityAudit
+
+  * For API details, see [ListAttachedRolePolicies](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+