AWS Security ChangesHomeSearch

AWS code-library medium security documentation change

Service: code-library · 2025-06-28 · Security-related medium

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

Summary

Added PowerShell V5 example for access auditing

Security assessment

Enables detection of unused permissions through access auditing, which is crucial for maintaining least-privilege security posture.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_GenerateServiceLastAccessedDetails_section.md b/code-library/latest/ug/iam_example_iam_GenerateServiceLastAccessedDetails_section.md
index 9b5d5fb4f..e39b54845 100644
--- a//code-library/latest/ug/iam_example_iam_GenerateServiceLastAccessedDetails_section.md
+++ b//code-library/latest/ug/iam_example_iam_GenerateServiceLastAccessedDetails_section.md
@@ -72,0 +73,14 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example is equivalent cmdlet of GenerateServiceLastAccessedDetails API. This provides with a job id which can be used in Get-IAMServiceLastAccessedDetail and Get-IAMServiceLastAccessedDetailWithEntity**
+    
+    
+    Request-IAMServiceLastAccessedDetail -Arn arn:aws:iam::123456789012:user/TestUser
+    
+
+  * For API details, see [GenerateServiceLastAccessedDetails](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+