AWS Security ChangesHomeSearch

AWS powershell medium security documentation change

Service: powershell · 2025-06-22 · Security-related medium

File: powershell/v5/userguide/pstools-ec2-get-amis.md

Summary

Removed references to Get-EC2ImageByName and replaced with Get-SSMLatestEC2Image, emphasizing retrieval of updated AMIs.

Security assessment

Explicitly replacing Get-EC2ImageByName with Get-SSMLatestEC2Image ensures users obtain the most recent AMIs, which typically include critical security patches. This change directly addresses potential security risks from using outdated images.

Diff

diff --git a/powershell/v5/userguide/pstools-ec2-get-amis.md b/powershell/v5/userguide/pstools-ec2-get-amis.md
index 34c2d44f7..3564ba4b1 100644
--- a//powershell/v5/userguide/pstools-ec2-get-amis.md
+++ b//powershell/v5/userguide/pstools-ec2-get-amis.md
@@ -5 +5 @@
-Get-EC2ImageGet-EC2ImageByName
+Get-EC2Image
@@ -11,10 +11 @@ The AWS Tools for PowerShell version 5 (V5) is in preview, therefore this conten
-When you launch an Amazon EC2 instance, you specify an Amazon Machine Image (AMI) to serve as a template for the instance. However, the IDs for the AWS Windows AMIs change frequently because AWS provides new AMIs with the latest updates and security enhancements. You can use the [Get-EC2Image](https://docs.aws.amazon.com/powershell/v5/reference/items/Get-EC2Image.html) and [Get-EC2ImageByName](https://docs.aws.amazon.com/powershell/v5/reference/items/Get-EC2ImageByName.html) cmdlets to find the current Windows AMIs and get their IDs.
-
-###### Topics
-
-  * Get-EC2Image
-
-  * Get-EC2ImageByName
-
-
-
+When you launch an Amazon EC2 instance, you specify an Amazon Machine Image (AMI) to serve as a template for the instance. However, the IDs for the AWS Windows AMIs change frequently because AWS provides new AMIs with the latest updates and security enhancements. You can use the [Get-EC2Image](https://docs.aws.amazon.com/powershell/v5/reference/items/Get-EC2Image.html) cmdlet to find the current Windows AMIs and get their IDs.
@@ -68,53 +59 @@ The following is an example of one of the AMIs returned by the cmdlet; the actua
-## Get-EC2ImageByName
-
-The `Get-EC2ImageByName` cmdlet enables you to filter the list of AWS Windows AMIs based on the type of server configuration you are interested in.
-
-When run with no parameters, as follows, the cmdlet emits the complete set of current filter names:
-    
-    
-    PS > Get-EC2ImageByName
-    
-    WINDOWS_2016_BASE
-    WINDOWS_2016_NANO
-    WINDOWS_2016_CORE
-    WINDOWS_2016_CONTAINER
-    WINDOWS_2016_SQL_SERVER_ENTERPRISE_2016
-    WINDOWS_2016_SQL_SERVER_STANDARD_2016
-    WINDOWS_2016_SQL_SERVER_WEB_2016
-    WINDOWS_2016_SQL_SERVER_EXPRESS_2016
-    WINDOWS_2012R2_BASE
-    WINDOWS_2012R2_CORE
-    WINDOWS_2012R2_SQL_SERVER_EXPRESS_2016
-    WINDOWS_2012R2_SQL_SERVER_STANDARD_2016
-    WINDOWS_2012R2_SQL_SERVER_WEB_2016
-    WINDOWS_2012R2_SQL_SERVER_EXPRESS_2014
-    WINDOWS_2012R2_SQL_SERVER_STANDARD_2014
-    WINDOWS_2012R2_SQL_SERVER_WEB_2014
-    WINDOWS_2012_BASE
-    WINDOWS_2012_SQL_SERVER_EXPRESS_2014
-    WINDOWS_2012_SQL_SERVER_STANDARD_2014
-    WINDOWS_2012_SQL_SERVER_WEB_2014
-    WINDOWS_2012_SQL_SERVER_EXPRESS_2012
-    WINDOWS_2012_SQL_SERVER_STANDARD_2012
-    WINDOWS_2012_SQL_SERVER_WEB_2012
-    WINDOWS_2012_SQL_SERVER_EXPRESS_2008
-    WINDOWS_2012_SQL_SERVER_STANDARD_2008
-    WINDOWS_2012_SQL_SERVER_WEB_2008
-    WINDOWS_2008R2_BASE
-    WINDOWS_2008R2_SQL_SERVER_EXPRESS_2012
-    WINDOWS_2008R2_SQL_SERVER_STANDARD_2012
-    WINDOWS_2008R2_SQL_SERVER_WEB_2012
-    WINDOWS_2008R2_SQL_SERVER_EXPRESS_2008
-    WINDOWS_2008R2_SQL_SERVER_STANDARD_2008
-    WINDOWS_2008R2_SQL_SERVER_WEB_2008
-    WINDOWS_2008RTM_BASE
-    WINDOWS_2008RTM_SQL_SERVER_EXPRESS_2008
-    WINDOWS_2008RTM_SQL_SERVER_STANDARD_2008
-    WINDOWS_2008_BEANSTALK_IIS75
-    WINDOWS_2012_BEANSTALK_IIS8
-    VPC_NAT
-
-To narrow the set of images returned, specify one or more filter names using the `Names` parameter.
-    
-    
-    PS > Get-EC2ImageByName -Names WINDOWS_2016_CORE
+###### Note
@@ -122,24 +61 @@ To narrow the set of images returned, specify one or more filter names using the
-    Architecture        : x86_64
-    BlockDeviceMappings : {/dev/sda1, xvdca, xvdcb, xvdcc…}
-    CreationDate        : 2019-08-16T09:36:09.000Z
-    Description         : Microsoft Windows Server 2016 Core Locale English AMI provided by Amazon
-    EnaSupport          : True
-    Hypervisor          : xen
-    ImageId             : ami-06f2a2afca06f15fc
-    ImageLocation       : amazon/Windows_Server-2016-English-Core-Base-2019.08.16
-    ImageOwnerAlias     : amazon
-    ImageType           : machine
-    KernelId            : 
-    Name                : Windows_Server-2016-English-Core-Base-2019.08.16
-    OwnerId             : 801119661308
-    Platform            : Windows
-    ProductCodes        : {}
-    Public              : True
-    RamdiskId           : 
-    RootDeviceName      : /dev/sda1
-    RootDeviceType      : ebs
-    SriovNetSupport     : simple
-    State               : available
-    StateReason         : 
-    Tags                : {}
-    VirtualizationType  : hvm
+Version 4 of the AWS Tools for PowerShell provided the `Get-EC2ImageByName` cmdlet to filter the list of AMIs by name patterns. For version 5 of the tools, use the [Get-SSMLatestEC2Image](https://docs.aws.amazon.com/powershell/v5/reference/items/Get-SSMLatestEC2Image.html) cmdlet instead.