Bird
0
0

You wrote this JSON snippet to request a Spot Instance but it fails:

medium📝 Debug Q14 of 15
AWS - Cost Optimization
You wrote this JSON snippet to request a Spot Instance but it fails:
{
  "InstanceCount": 1,
  "Type": "one-time",
  "LaunchSpecification": {
    "InstanceType": "t3.micro",
    "ImageId": "ami-0abcdef1234567890"
  }
}
What is the likely error causing the failure?
AWrong <code>Type</code> value; should be "persistent" only.
BMissing the <code>SpotPrice</code> field to set max price.
CIncorrect <code>InstanceCount</code> value; must be zero.
DInvalid <code>ImageId</code> format; must be numeric only.
Step-by-Step Solution
Solution:
  1. Step 1: Check required fields for Spot Instance request

    Spot requests require a SpotPrice to specify max price willing to pay.
  2. Step 2: Validate other fields

    InstanceCount of 1 is valid, Type can be "one-time", and ImageId format is correct.
  3. Final Answer:

    Missing the SpotPrice field to set max price. -> Option B
  4. Quick Check:

    SpotPrice required for request [OK]
Quick Trick: SpotPrice is mandatory in Spot Instance requests [OK]
Common Mistakes:
  • Omitting SpotPrice field
  • Using invalid Type values
  • Misunderstanding ImageId format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes