AWS code-library documentation change
Summary
Added PowerShell examples for retrieving AMI attributes including launch permissions and SR-IOV networking support
Security assessment
The examples document how to inspect launch permissions (including public access via 'all' value) and networking attributes, which are security-relevant features for AMI management
Diff
diff --git a/code-library/latest/ug/ec2_example_ec2_DescribeImageAttribute_section.md b/code-library/latest/ug/ec2_example_ec2_DescribeImageAttribute_section.md index 565dd4cfa..888085d72 100644 --- a//code-library/latest/ug/ec2_example_ec2_DescribeImageAttribute_section.md +++ b//code-library/latest/ug/ec2_example_ec2_DescribeImageAttribute_section.md @@ -126,0 +127,62 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example gets the description for the specified AMI.** + + + Get-EC2ImageAttribute -ImageId ami-12345678 -Attribute description + + +**Output:** + + + BlockDeviceMappings : {} + Description : My image description + ImageId : ami-12345678 + KernelId : + LaunchPermissions : {} + ProductCodes : {} + RamdiskId : + SriovNetSupport : + +**Example 2: This example gets the launch permissions for the specified AMI.** + + + Get-EC2ImageAttribute -ImageId ami-12345678 -Attribute launchPermission + + +**Output:** + + + BlockDeviceMappings : {} + Description : + ImageId : ami-12345678 + KernelId : + LaunchPermissions : {all} + ProductCodes : {} + RamdiskId : + SriovNetSupport : + +**Example 3: This example test whether enhanced networking is enabled.** + + + Get-EC2ImageAttribute -ImageId ami-12345678 -Attribute sriovNetSupport + + +**Output:** + + + BlockDeviceMappings : {} + Description : + ImageId : ami-12345678 + KernelId : + LaunchPermissions : {} + ProductCodes : {} + RamdiskId : + SriovNetSupport : simple + + * For API details, see [DescribeImageAttribute](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +