Bird
0
0

Given this event pattern in a CloudWatch Events rule JSON:

medium📝 service behavior Q4 of 15
AWS - CloudWatch
Given this event pattern in a CloudWatch Events rule JSON:
{"source": ["aws.ec2"], "detail-type": ["EC2 Instance State-change Notification"], "detail": {"state": ["running"]}}

What event will trigger this rule?
AAny EC2 instance state change
BEC2 instance starting to run
CEC2 instance stopping
DAny AWS service event
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the event pattern fields

    The pattern filters events from source "aws.ec2" with detail-type "EC2 Instance State-change Notification" and state "running".
  2. Step 2: Interpret the state filter

    The rule triggers only when an EC2 instance changes state to "running" (starts).
  3. Final Answer:

    EC2 instance starting to run -> Option B
  4. Quick Check:

    State filter "running" = triggers on start [OK]
Quick Trick: State "running" means instance just started [OK]
Common Mistakes:
MISTAKES
  • Assuming all state changes trigger the rule
  • Confusing "running" with "stopped" state

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes