AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 example for attaching policy to IAM user

Security assessment

Documents user policy management, a security feature, without evidence of vulnerability mitigation.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_AttachUserPolicy_section.md b/code-library/latest/ug/iam_example_iam_AttachUserPolicy_section.md
index bc75b3a8e..f814fb8b3 100644
--- a//code-library/latest/ug/iam_example_iam_AttachUserPolicy_section.md
+++ b//code-library/latest/ug/iam_example_iam_AttachUserPolicy_section.md
@@ -59,0 +60,14 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example attaches the AWS managed policy named`AmazonCognitoPowerUser` to the IAM user `Bob`. The user is immediately affected by the permissions defined in the latest version of that policy.**
+    
+    
+    Register-IAMUserPolicy -UserName Bob -PolicyArn arn:aws:iam::aws:policy/AmazonCognitoPowerUser
+    
+
+  * For API details, see [AttachUserPolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+