Bird
0
0

You have this CloudWatch Events rule JSON:

medium📝 Debug Q7 of 15
AWS - CloudWatch
You have this CloudWatch Events rule JSON:
{"EventPattern": {"source": ["aws.ec2"]}, "Targets": [{"Id": "target1", "Arn": "arn:aws:lambda:us-east-1:123456789012:function:ProcessEvent"}]}

The Lambda function is not invoked when EC2 events occur. What is the most probable reason?
AThe rule is missing permissions to invoke the Lambda function.
BThe event pattern is incorrect and does not match any EC2 events.
CThe target ARN is invalid because it uses the wrong region.
DThe rule does not specify a schedule expression.
Step-by-Step Solution
Solution:
  1. Step 1: Check event pattern

    The event pattern matches EC2 events, so it is likely correct.
  2. Step 2: Verify target ARN

    The ARN appears valid and region is consistent.
  3. Step 3: Consider permissions

    EventBridge requires permission to invoke the Lambda function via resource-based policy.
  4. Final Answer:

    The rule is missing permissions to invoke the Lambda function. -> Option A
  5. Quick Check:

    Missing Lambda invoke permissions [OK]
Quick Trick: Lambda needs invoke permissions from EventBridge [OK]
Common Mistakes:
  • Assuming event pattern is always wrong
  • Ignoring Lambda resource-based permissions
  • Confusing schedule expression with event pattern

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes