5

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"
      ]
    }
  }
DenCowboy
  • 13,884
  • 38
  • 114
  • 210

1 Answers1

6

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.

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • so how can I pass an ssm update of a certain resource/param? – DenCowboy Jan 24 '22 at 11:31
  • @DenCowboy Pass where? To the sqs? – Marcin Jan 24 '22 at 11:32
  • to a custom bus. I want a custom bus because I need some special policy for it which I don't want to put on my default bus. – DenCowboy Jan 24 '22 at 11:33
  • @DenCowboy A target on a default bus, can be a custom bus. So you can try that. For more complex filtering, you would have to use lambda as target first, and then publish events from lambda to a custom bus. – Marcin Jan 24 '22 at 11:37
  • 1
    Thanks, I'll publish a custom event from my lambda to the bus – DenCowboy Jan 24 '22 at 11:40
  • Thanks, took me hours wondering why events are not getting triggered... I feel like AWS should have disabled the AWS services event source when creating a rule under a custom event bus.... – daisura99 Apr 07 '23 at 02:47