I want to create a "Rule with an event pattern" where the match is any event from SQS.
This is my CloudFormation Template:
AWSTemplateFormatVersion: '2010-09-09'
Description: CloudFormation template for EventBridge rule 'RuleSQSToLambda'
Resources:
EventRule0:
Type: AWS::Events::Rule
Properties:
Description: trigger by all sqs actions
EventBusName: default
EventPattern:
source:
- aws.sqs
Name: RuleSQSToLambda
State: ENABLED
Targets:
- Id: <some id>
Arn: arn:aws:lambda:eu-west-2:<account id>:function:<lambda function name>
RetryPolicy:
MaximumRetryAttempts: 0
MaximumEventAgeInSeconds: 60
But no Invocations or TriggeredRules show up in the Rule monitoring when I SendMessage to a queue or create a new queue (also the lambda is not triggered).
QUESTION: What could be the reason the EventBridge Rule is not triggered?
My guess: I made the same attempt with S3 events, obtaining an identical CloudFormation template but for
EventPattern:
source:
- aws.s3
which first failed as above, until I realized I had to set Send notifications to Amazon EventBridge for all events in this bucket
to On
within the desired S3 bucket permissions. Then the EventBridge Rule was invoked succesfully. I tried to find this Send notifications switch
for my SQS queue but I cannot find anywhere. Could this be the issue?