AWS Security ChangesHomeSearch

AWS IAM documentation change

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

File: IAM/latest/UserGuide/iam_example_iam_GetContextKeysForPrincipalPolicy_section.md

Summary

Added PowerShell V5 example for policy context key evaluation

Security assessment

Documents security policy analysis capabilities without indicating resolution of a security issue

Diff

diff --git a/IAM/latest/UserGuide/iam_example_iam_GetContextKeysForPrincipalPolicy_section.md b/IAM/latest/UserGuide/iam_example_iam_GetContextKeysForPrincipalPolicy_section.md
index 9a8a22b8f..41eadbdbe 100644
--- a//IAM/latest/UserGuide/iam_example_iam_GetContextKeysForPrincipalPolicy_section.md
+++ b//IAM/latest/UserGuide/iam_example_iam_GetContextKeysForPrincipalPolicy_section.md
@@ -59,0 +60,16 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example fetches all the context keys present in the provided policy json and the policies attached to IAM entity(user/role etc.). For -PolicyInputList you can provide multiple values list as comma separated values.**
+    
+    
+    $policy1 = '{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"dynamodb:*","Resource":"arn:aws:dynamodb:us-west-2:123456789012:table/","Condition":{"DateGreaterThan":{"aws:CurrentTime":"2015-08-16T12:00:00Z"}}}}'
+    $policy2 = '{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"dynamodb:*","Resource":"arn:aws:dynamodb:us-west-2:123456789012:table/"}}'
+    Get-IAMContextKeysForPrincipalPolicy -PolicyInputList $policy1,$policy2 -PolicySourceArn arn:aws:iam::852640994763:user/TestUser
+    
+
+  * For API details, see [GetContextKeysForPrincipalPolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+