AWS Security ChangesHomeSearch

AWS AWSEC2 documentation change

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

File: AWSEC2/latest/UserGuide/spot-requests.md

Summary

Simplified section headers, removed specific parameters from CLI examples, added PowerShell implementation for Spot Instance requests, and updated documentation structure

Security assessment

Changes focus on improving clarity and adding PowerShell support for Spot Instance management. No security-related content or vulnerabilities addressed in the modifications.

Diff

diff --git a/AWSEC2/latest/UserGuide/spot-requests.md b/AWSEC2/latest/UserGuide/spot-requests.md
index 591bd6231..86ceec6ea 100644
--- a//AWSEC2/latest/UserGuide/spot-requests.md
+++ b//AWSEC2/latest/UserGuide/spot-requests.md
@@ -25 +25 @@ Console
-###### To create a Spot Instance request using the launch instance wizard
+###### To create a Spot Instance request
@@ -87 +87 @@ If you specify a maximum price, it must be more than USD $0.001. Specifying a va
-To review Spot price trends, see [Spot Instance pricing history](./using-spot-instances-history.html).
+To review Spot price trends, see [View Spot Instance pricing history](./using-spot-instances-history.html).
@@ -137 +137 @@ AWS CLI
-###### To create a Spot Instance request
+###### To create a Spot Instance request using run-instances
@@ -139 +139 @@ AWS CLI
-Use the [run-instances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/run-instances.html) command and specify the Spot Instance options in the `--instance-market-options` parameter.
+Use the [run-instances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/run-instances.html) command and specify the Spot Instance options in the `--instance-market-options` parameter as follows.
@@ -142,7 +141,0 @@ Use the [run-instances](https://awscli.amazonaws.com/v2/documentation/api/latest
-    aws ec2 run-instances \
-        --image-id ami-0abcdef1234567890 \
-        --instance-type t2.micro \
-        --count 5 \
-        --subnet-id subnet-08fc749671b2d077c \
-        --key-name MyKeyPair \
-        --security-group-ids sg-0b0384b66d7d692f9 \
@@ -151 +144 @@ Use the [run-instances](https://awscli.amazonaws.com/v2/documentation/api/latest
-The following is the data structure to specify in the JSON file for `--instance-market-options`. You can also specify `ValidUntil` and `InstanceInterruptionBehavior`. If you do not specify a field in the data structure, the default value is used.
+The following is the data structure to specify in the JSON file. You can also specify `ValidUntil` and `InstanceInterruptionBehavior`. If you do not specify a field in the data structure, the default value is used.
@@ -163 +156 @@ The following example creates a `persistent` request.
-**To create a Spot Instance request using[ request-spot-instances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/request-spot-instances.html)**
+**To create a Spot Instance request using request-spot-instances**
@@ -186,0 +180,19 @@ For example launch specification files to use with these commands, see [Spot Ins
+PowerShell
+    
+
+###### To create a Spot Instance request
+
+Use the [New-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/New-EC2Instance.html) cmdlet and specify the Spot Instance options using the `-InstanceMarketOption` parameter.
+    
+    
+    -InstanceMarketOptions $marketOptions
+
+Create the data structure for the Spot Instance options as follows.
+    
+    
+    $spotOptions = New-Object Amazon.EC2.Model.SpotMarketOptions
+    $spotOptions.SpotInstanceType="persistent"
+    $marketOptions = New-Object Amazon.EC2.Model.InstanceMarketOptionsRequest
+    $marketOptions.MarketType = "spot"
+    $marketOptions.SpotOptions = $spotOptions
+