AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 example for Update-SSMManagedInstanceRole to modify IAM roles

Security assessment

The example demonstrates IAM role management for EC2 instances, which is a security best practice for least privilege access. However, this documents standard operational procedures rather than addressing a specific security flaw.

Diff

diff --git a/code-library/latest/ug/ssm_example_ssm_UpdateManagedInstanceRole_section.md b/code-library/latest/ug/ssm_example_ssm_UpdateManagedInstanceRole_section.md
index ebc062075..4fb04e107 100644
--- a//code-library/latest/ug/ssm_example_ssm_UpdateManagedInstanceRole_section.md
+++ b//code-library/latest/ug/ssm_example_ssm_UpdateManagedInstanceRole_section.md
@@ -52,0 +53,14 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example updates the role of a managed instance. There is no output if the command succeeds.**
+    
+    
+    Update-SSMManagedInstanceRole -InstanceId "mi-08ab247cdf1046573" -IamRole "AutomationRole"
+    
+
+  * For API details, see [UpdateManagedInstanceRole](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+