0

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?

Rgkpdx
  • 257
  • 1
  • 9
  • 1
    See the answer on the duplicate question I flagged on your question: https://stackoverflow.com/questions/66537811/sqs-with-aws-event-bridge If you have a specific need to send SQS messages to AWS Lambda that isn't covered by the AWS Lambda SQS integration: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html then please describe the specific problem you are trying to solve. – Mark B Jan 04 '23 at 17:57

0 Answers0