AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 example for creating IAM instance profiles

Security assessment

Standard documentation update about instance profile creation. Instance profiles are security tools but this change doesn't introduce new security concepts.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_CreateInstanceProfile_section.md b/code-library/latest/ug/iam_example_iam_CreateInstanceProfile_section.md
index fb1c5a3dc..c9893d86b 100644
--- a//code-library/latest/ug/iam_example_iam_CreateInstanceProfile_section.md
+++ b//code-library/latest/ug/iam_example_iam_CreateInstanceProfile_section.md
@@ -259,0 +260,24 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example creates a new IAM instance profile named`ProfileForDevEC2Instance`. You must separately run the `Add-IAMRoleToInstanceProfile` command to associate the instance profile with an existing IAM role that provides permissions to the instance. Finally, attach the instance profile to an EC2 instance when you launch it. To do that, use the `New-EC2Instance` cmdlet with either the `InstanceProfile_Arn` or `InstanceProfile_Name` parameter.**
+    
+    
+    New-IAMInstanceProfile -InstanceProfileName ProfileForDevEC2Instance
+    
+
+**Output:**
+    
+    
+    Arn                 : arn:aws:iam::123456789012:instance-profile/ProfileForDevEC2Instance
+    CreateDate          : 4/14/2015 11:31:39 AM
+    InstanceProfileId   : DYMFXL556EY46EXAMPLE1
+    InstanceProfileName : ProfileForDevEC2Instance
+    Path                : /
+    Roles               : {}
+
+  * For API details, see [CreateInstanceProfile](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+