Complete the code to specify the instance market option as Spot in the AWS EC2 launch template.
LaunchTemplateData={"InstanceMarketOptions": {"MarketType": "[1]"}}The MarketType must be set to "spot" to request Spot Instances, which are cheaper than On-Demand instances.
Complete the code to set the maximum price you are willing to pay per hour for a Spot Instance.
"SpotOptions": {"MaxPrice": "[1]"}
The MaxPrice should be set to a low value like "0.03" to save costs, representing the maximum hourly price you accept.
Fix the error in the Spot Instance request code by completing the missing key for interruption behavior.
"SpotOptions": {"InterruptionBehavior": "[1]"}
The valid interruption behaviors are "terminate", "stop", or "hibernate". "terminate" immediately ends the instance when interrupted.
Fill both blanks to configure a Spot Instance request with a valid instance type and a valid Spot allocation strategy.
"InstanceType": "[1]", "SpotOptions": {"AllocationStrategy": "[2]"}
"t3.micro" is a valid instance type for cost savings. "capacity-optimized" is a recommended Spot allocation strategy to reduce interruptions.
Fill all three blanks to create a Spot Instance request with a launch template name, Spot market type, and interruption behavior.
"LaunchTemplateName": "[1]", "InstanceMarketOptions": {"MarketType": "[2]", "SpotOptions": {"InterruptionBehavior": "[3]"}}
Use a valid launch template name like "my-spot-template". Set MarketType to "spot" to request Spot Instances. Set InterruptionBehavior to "terminate" to end the instance on interruption.