Bird
0
0

Which of the following is the correct JSON snippet to create a CloudWatch alarm that triggers when CPU utilization exceeds 80%?

easy📝 Syntax Q3 of 15
AWS - Architecture Best Practices
Which of the following is the correct JSON snippet to create a CloudWatch alarm that triggers when CPU utilization exceeds 80%?
A{\"AlarmName\": \"HighCPU\", \"MetricName\": \"CPUUtilization\", \"Threshold\": 80, \"ComparisonOperator\": \"LessThanThreshold\"}
B{\"AlarmName\": \"HighCPU\", \"MetricName\": \"CPUUtilization\", \"Threshold\": \"80%\", \"ComparisonOperator\": \"GreaterThanThreshold\"}
C{\"AlarmName\": \"HighCPU\", \"MetricName\": \"CPUUtilization\", \"Threshold\": 0.8, \"ComparisonOperator\": \"GreaterThanThreshold\"}
D{\"AlarmName\": \"HighCPU\", \"MetricName\": \"CPUUtilization\", \"Threshold\": 80, \"ComparisonOperator\": \"GreaterThanThreshold\"}
Step-by-Step Solution
Solution:
  1. Step 1: Understand CloudWatch alarm threshold format

    The Threshold value must be a number without a percent sign. 80 means 80% CPU utilization.
  2. Step 2: Check the comparison operator

    To trigger when CPU exceeds 80%, use "GreaterThanThreshold".
  3. Final Answer:

    Valid JSON with Threshold 80 and GreaterThanThreshold -> Option D
  4. Quick Check:

    Threshold number and correct operator = {\"AlarmName\": \"HighCPU\", \"MetricName\": \"CPUUtilization\", \"Threshold\": 80, \"ComparisonOperator\": \"GreaterThanThreshold\"} [OK]
Quick Trick: Threshold is a number, no % sign; use GreaterThanThreshold [OK]
Common Mistakes:
  • Using string with % sign for Threshold
  • Using LessThanThreshold instead of GreaterThanThreshold
  • Using decimal 0.8 instead of 80

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes