Issue with EventBridge rule for


I want to send to CloudWatch logs ALL the events sent to a custom event bus.

I created the custom event bus: my-event-bus

I created the CloudWatch log group

I created the event bus policy so everyone within my account can put an event into my-event-bus

I created a rule for that custom bus

This is the rule:

    Type: AWS::Events::Rule
      Description: Testing rule
      Name: testing-rule-for-my-event-bus
      State: ENABLED
        - Arn: arn:aws:logs:us-east-1:MY_ACCOUNT_ID:log-group:my-event-bus-log-group
          Id: 'my-bus'

When I try to put an event
aws events put-events --entries file://put-events.json

I receive the following error

    "FailedEntryCount": 1,
    "Entries": [
            "ErrorCode": "NotAuthorizedForSourceException",
            "ErrorMessage": "Not authorized for the source."

This is the content of put-events.json

      "Source": "",
      "EventBusName": "my-event-bus",
      "Detail": "{ "key1": "value3", "key2": "value4" }",
      "Resources": [
      "DetailType": "myDetailType"

But, if I change the source to other, for example, ‘hello’, in both, the rule and the event it works.

What am I doing wrong?
I want to make it work with so all the events sent to this bus end in CloudWatch (target)

Solution belongs to AWS, not to you, thus you can’t define it as source of your events. Only AWS can do it.

You need to use your own custom name for the source of your events, e.g.

Leave a Reply

Your email address will not be published. Required fields are marked *