Bird
0
0

You wrote this CloudWatch Events rule JSON snippet:

medium📝 Debug Q6 of 15
AWS - CloudWatch
You wrote this CloudWatch Events rule JSON snippet:
{"EventPattern": {"source": ["aws.ec2"]}, "Targets": [{"Arn": "arn:aws:sns:us-east-1:123456789012:MyTopic"}]}

Why might this rule fail to trigger the SNS topic?
AIncorrect event source name
BMissing "Id" field in the target definition
CSNS topics cannot be targets
DEventPattern must be a string, not an object
Step-by-Step Solution
Solution:
  1. Step 1: Check target configuration requirements

    Each target in EventBridge must have an "Id" field to identify it.
  2. Step 2: Identify missing "Id" in the target

    The target JSON lacks the required "Id" field, causing failure.
  3. Final Answer:

    Missing "Id" field in the target definition -> Option B
  4. Quick Check:

    Targets need "Id" field to work [OK]
Quick Trick: Always include "Id" for each target in EventBridge rules [OK]
Common Mistakes:
MISTAKES
  • Ignoring the required "Id" field
  • Thinking SNS cannot be a target
  • Misunderstanding event pattern format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes