Bird
0
0

This code snippet tries to launch Spot Instances but fails:

medium📝 Debug Q7 of 15
AWS - Cost Optimization
This code snippet tries to launch Spot Instances but fails:
aws ec2 request-spot-instances --spot-price 0.02 --instance-count 1 --launch-specification file://spec.json

Spec.json contains an invalid instance type. What is the expected behavior?
AThe request fails with an error about invalid instance type
BAWS automatically selects a valid instance type
CThe Spot Instance launches with default instance type
DThe request is accepted but instance never launches
Step-by-Step Solution
Solution:
  1. Step 1: Understand validation on launch specification

    AWS validates instance types; invalid types cause request failure.
  2. Step 2: AWS behavior on invalid input

    AWS does not auto-correct or default; it returns an error.
  3. Final Answer:

    The request fails with an error about invalid instance type -> Option A
  4. Quick Check:

    Invalid instance type = Request error [OK]
Quick Trick: Invalid instance types cause request errors [OK]
Common Mistakes:
  • Expecting AWS to auto-select instance types
  • Assuming instance launches with default type
  • Thinking request silently fails without error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes