Bird
0
0

You wrote this snippet to request Spot Instances but get an error:

medium📝 Debug Q6 of 15
AWS - Cost Optimization
You wrote this snippet to request Spot Instances but get an error:
aws ec2 request-spot-instances --spot-price 0.03 --instance-count 2 --launch-specification spec.json

What is the likely cause?
AIncorrect parameter '--instance-count' should be '--count'
BSpot price must be higher than 0.05
CMissing 'file://' prefix before spec.json
DSpot Instances cannot be requested via CLI
Step-by-Step Solution
Solution:
  1. Step 1: Check file parameter syntax

    The launch specification file must be referenced with 'file://' prefix.
  2. Step 2: Validate other parameters

    '--instance-count' is correct; price can be below 0.05; CLI supports Spot requests.
  3. Final Answer:

    Missing 'file://' prefix before spec.json -> Option C
  4. Quick Check:

    File paths need 'file://' prefix [OK]
Quick Trick: Use 'file://' prefix for JSON files in CLI [OK]
Common Mistakes:
  • Omitting 'file://' before JSON file
  • Confusing parameter names
  • Assuming Spot requests not supported in CLI

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes