AWS code-library documentation change
Summary
Added PowerShell V5 examples for querying IAM key rotation compliance
Security assessment
Shows how to check compliance with access key rotation policies - a security best practice - but does not address vulnerabilities.
Diff
diff --git a/code-library/latest/ug/config-service_example_config-service_GetComplianceDetailsByConfigRule_section.md b/code-library/latest/ug/config-service_example_config-service_GetComplianceDetailsByConfigRule_section.md index 4750d6986..cb3e8a840 100644 --- a//code-library/latest/ug/config-service_example_config-service_GetComplianceDetailsByConfigRule_section.md +++ b//code-library/latest/ug/config-service_example_config-service_GetComplianceDetailsByConfigRule_section.md @@ -115,0 +116,36 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example obtains the evaluation results for the rule access-keys-rotated and returns the output grouped by compliance-type** + + + Get-CFGComplianceDetailsByConfigRule -ConfigRuleName access-keys-rotated | Group-Object ComplianceType + + +**Output:** + + + Count Name Group + ----- ---- ----- + 2 COMPLIANT {Amazon.ConfigService.Model.EvaluationResult, Amazon.ConfigService.Model.EvaluationResult} + 5 NON_COMPLIANT {Amazon.ConfigService.Model.EvaluationResult, Amazon.ConfigService.Model.EvaluationResult, Amazon.ConfigService.Model.EvaluationRes... + +**Example 2: This example queries compliance details for the rule access-keys-rotated for COMPLIANT resources.** + + + Get-CFGComplianceDetailsByConfigRule -ConfigRuleName access-keys-rotated -ComplianceType COMPLIANT | ForEach-Object {$_.EvaluationResultIdentifier.EvaluationResultQualifier} + + +**Output:** + + + ConfigRuleName ResourceId ResourceType + -------------- ---------- ------------ + access-keys-rotated BCAB1CDJ2LITAPVEW3JAH AWS::IAM::User + access-keys-rotated BCAB1CDJ2LITL3EHREM4Q AWS::IAM::User + + * For API details, see [GetComplianceDetailsByConfigRule](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +