AWS IAM documentation change
Summary
Added PowerShell V5 example for creating an IAM instance profile and associating it with an EC2 instance
Security assessment
The change demonstrates proper instance profile creation and role association, which relates to secure EC2 permission management but doesn't address a specific vulnerability
Diff
diff --git a/IAM/latest/UserGuide/iam_example_iam_CreateInstanceProfile_section.md b/IAM/latest/UserGuide/iam_example_iam_CreateInstanceProfile_section.md index 8dcc74021..6377347bd 100644 --- a//IAM/latest/UserGuide/iam_example_iam_CreateInstanceProfile_section.md +++ b//IAM/latest/UserGuide/iam_example_iam_CreateInstanceProfile_section.md @@ -257,0 +258,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)_. + + + +