Search code examples
amazon-web-servicesaws-event-bridge

Eventbridge bus: can't receive messages on custom event bus?


I'm using AWS Eventbridge and I have the exact same rule on my default bus as on a custom bus. The target for both is an SQS queue. When I push an event I can see a message on my queue which is the target of the rule of my default bus.

I don't see anything on the queue of the rule of my custom bus. Also the metrics don't show an invocation. What am I doint wrong? I've created a custom bus.

I tried both without any policy as with the following policy:

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "allow_account_to_put_events",
    "Effect": "Allow",
    "Principal": {
      "AWS": "arn:aws:iam::my-account:root"
    },
    "Action": "events:PutEvents",
    "Resource": "arn:aws:events:xxx:my-account:event-bus/my-bus-name"
  }]
}

My event pattern:

  {
    "source": [
      "aws.ssm"
    ],
    "detail-type": [
      "Parameter Store Change"
    ],
    "detail": {
      "name": [
        "someparam"
      ],
      "operation": [
        "Update"
      ]
    }
  }

Solution

  • Your custom bus will not receive any "aws.ssm" events. All aws.* are going to default bus only. The custom bus can only receive custom events from your application, e.g.:

        "source": [
          "myapp.test"
        ]
    

    From docs:

    When an AWS service in your account emits an event, it goes to your account’s default event bus.