AWS Security ChangesHomeSearch

AWS AWSEC2 documentation change

Service: AWSEC2 · 2025-04-18 · Documentation low

File: AWSEC2/latest/UserGuide/ami-last-launched-time.md

Summary

Updated documentation for viewing AMI last launched time with clearer CLI/PowerShell examples and workflow steps. Added explicit verification notes about AMI ownership requirements.

Security assessment

Changes emphasize verifying AMI ownership to view attributes, which relates to access control but doesn't address a specific vulnerability. The updates are documentation improvements rather than security fixes or new security features.

Diff

diff --git a/AWSEC2/latest/UserGuide/ami-last-launched-time.md b/AWSEC2/latest/UserGuide/ami-last-launched-time.md
index 89e41808d..301971faa 100644
--- a//AWSEC2/latest/UserGuide/ami-last-launched-time.md
+++ b//AWSEC2/latest/UserGuide/ami-last-launched-time.md
@@ -31 +31,3 @@ Console
-  4. Select the AMI, and then check the **Last launched time** field (if you selected the checkbox next to the AMI, it's located on the **Details** tab). The field shows the date and time when the AMI was last used to launch an instance.
+  4. Select the checkbox for the AMI.
+
+  5. On the **Details** tab, find **Last launched time**.
@@ -39 +41,12 @@ AWS CLI
-You can use either the [describe-images](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html) or [describe-image-attribute](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-image-attribute.html) command to view the last launched time of an AMI that you own.
+###### To view the last launched time by describing the AMI
+
+Use the following [describe-images](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html) command. If `LastLaunchedTime` is not present in the output, verify that you own the AMI.
+    
+    
+    aws ec2 describe-images \
+        --image-id ami-0abcdef1234567890 \
+        --query Images[].LastLaunchedTime \
+        --output text
+
+The following is example output.
+    
@@ -41 +54 @@ You can use either the [describe-images](https://awscli.amazonaws.com/v2/documen
-###### To view the last launched time of an AMI by using describe-images
+    2025-02-17T20:22:19Z
@@ -43 +56 @@ You can use either the [describe-images](https://awscli.amazonaws.com/v2/documen
-Use the [describe-images](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html) command and specify the ID of the AMI.
+###### To view the last launched time attribute of an AMI
@@ -44,0 +58 @@ Use the [describe-images](https://awscli.amazonaws.com/v2/documentation/api/late
+Use the following [describe-image-attribute](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-image-attribute.html) command. You must be the owner of the specified AMI.
@@ -46 +60,6 @@ Use the [describe-images](https://awscli.amazonaws.com/v2/documentation/api/late
-    aws ec2 describe-images --image-id ami-0123456789example --query "Images[*].LastLaunchedTime[].Value"
+    
+    aws ec2 describe-image-attribute \
+        --image-id ami-0abcdef1234567890 \
+        --attribute lastLaunchedTime \
+        --query LastLaunchedTime.Value \
+        --output text
@@ -51,3 +70 @@ The following is example output.
-    [
-        "2024-04-02T02:03:18Z"
-    ]
+    2025-02-17T20:22:19Z
@@ -55 +72 @@ The following is example output.
-If `LastLaunchedTime` is not present, verify that you own the AMI.
+PowerShell
@@ -57 +73,0 @@ If `LastLaunchedTime` is not present, verify that you own the AMI.
-###### To view the last launched time of an AMI
@@ -59 +75 @@ If `LastLaunchedTime` is not present, verify that you own the AMI.
-Use the [describe-image-attribute](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-image-attribute.html) command and specify `--attribute lastLaunchedTime`. You must be the owner of the AMI to run this command.
+###### To view the last launched time by describing the AMI
@@ -60,0 +77 @@ Use the [describe-image-attribute](https://awscli.amazonaws.com/v2/documentation
+Use the following [Get-EC2Image](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Image.html) cmdlet. If `LastLaunchedTime` is not present in the output, verify that you own the AMI.
@@ -62,3 +79,16 @@ Use the [describe-image-attribute](https://awscli.amazonaws.com/v2/documentation
-    aws ec2 describe-image-attribute \
-        --image-id ami-0123456789example \
-        --attribute lastLaunchedTime
+    
+    (Get-EC2Image -ImageId ami-0abcdef1234567890).LastLaunchedTime
+
+The following is example output.
+    
+    
+    2025-02-17T20:22:19Z
+
+###### To view the last launched time attribute of an AMI
+
+Use the following [Get-EC2ImageAttribute](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2ImageAttribute.html) cmdlet. You must be the owner of the specified AMI.
+    
+    
+    (Get-EC2ImageAttribute `
+        -ImageId ami-0abcdef1234567890 `
+        -Attribute LastLaunchedTime).LastLaunchedTime
@@ -69,6 +99 @@ The following is example output.
-    {
-        "ImageId": "ami-1234567890example",
-        "LastLaunchedTime": {
-            "Value": "2022-02-10T02:03:18Z"
-        }
-    }
+    2025-02-17T20:22:19Z