AWS ec2 documentation change
Summary
Added PowerShell V5 examples for ImportImage operation with VM import details
Security assessment
The change demonstrates image import workflows but does not address security vulnerabilities or describe security controls beyond standard role requirements
Diff
diff --git a/ec2/latest/devguide/example_ec2_ImportImage_section.md b/ec2/latest/devguide/example_ec2_ImportImage_section.md index 6e1938bbb..c1236db47 100644 --- a//ec2/latest/devguide/example_ec2_ImportImage_section.md +++ b//ec2/latest/devguide/example_ec2_ImportImage_section.md @@ -93,0 +94,42 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example imports a single-disk virtual machine image from the specified Amazon S3 bucket to Amazon EC2 with an idempotency token. The example requires that a VM Import Service Role with the default name 'vmimport' exists, with a policy allowing Amazon EC2 access to the specified bucket, as explained in the VM Import Prequisites topic. To use a custom role, specify the role name using the`-RoleName` parameter.** + + + $container = New-Object Amazon.EC2.Model.ImageDiskContainer + $container.Format="VMDK" + $container.UserBucket = New-Object Amazon.EC2.Model.UserBucket + $container.UserBucket.S3Bucket = "amzn-s3-demo-bucket" + $container.UserBucket.S3Key = "Win_2008_Server_Standard_SP2_64-bit-disk1.vmdk" + + $parms = @{ + "ClientToken"="idempotencyToken" + "Description"="Windows 2008 Standard Image Import" + "Platform"="Windows" + "LicenseType"="AWS" + } + + Import-EC2Image -DiskContainer $container @parms + + +**Output:** + + + Architecture : + Description : Windows 2008 Standard Image + Hypervisor : + ImageId : + ImportTaskId : import-ami-abcdefgh + LicenseType : AWS + Platform : Windows + Progress : 2 + SnapshotDetails : {} + Status : active + StatusMessage : pending + + * For API details, see [ImportImage](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +