Bird
0
0

Which approach best achieves this?

hard📝 Application Q15 of 15
AWS - CloudWatch
You want to create a CloudWatch alarm that triggers an auto-scaling action when average CPU utilization exceeds 60% for 5 minutes, but only if this happens during business hours (9 AM to 5 PM). Which approach best achieves this?
ACreate a CloudWatch alarm with threshold 60% and EvaluationPeriods 1, then use EventBridge to trigger scaling only during business hours
BSet the alarm threshold to 60% and EvaluationPeriods to 5, and configure the alarm to be active only during business hours
CCreate a CloudWatch alarm with threshold 60% and EvaluationPeriods 5, then use a Lambda function triggered by the alarm to check time and trigger scaling
DSet the alarm threshold to 60% and EvaluationPeriods 5, and configure auto-scaling to ignore alarms outside business hours
Step-by-Step Solution
Solution:
  1. Step 1: Understand alarm and time condition needs

    CloudWatch alarms alone cannot restrict triggering by time; external logic is needed.
  2. Step 2: Evaluate options for time-based control

    Using a Lambda triggered by the alarm to check current time and decide on scaling is flexible and precise.
  3. Step 3: Assess other options

    EventBridge can schedule events but not filter alarm triggers by time; auto-scaling ignores alarms is not a feature.
  4. Final Answer:

    Create a CloudWatch alarm with threshold 60% and EvaluationPeriods 5, then use a Lambda function triggered by the alarm to check time and trigger scaling -> Option C
  5. Quick Check:

    Alarm + Lambda time check = controlled scaling [OK]
Quick Trick: Use Lambda to add time logic after alarm triggers [OK]
Common Mistakes:
  • Expecting alarm to handle time filtering alone
  • Assuming auto-scaling ignores alarms by time
  • Using EventBridge without alarm integration

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes