79515885

Date: 2025-03-17 22:34:48
Score: 0.5
Natty:
Report link

A note on the above answer, if the event is triggered by CLI/API with a custom event pattern then the event.source will be the one specified in the triggering call.

enter image description here

const client = new EventBridgeClient({});
const event = new PutEventsCommand({
  Entries: [
    {
      Source: "my_custom_source", // in this case `event.source` == "my_custom_source"
      Detail: JSON.stringify({ "a": "b"}),
      DetailType: "self trigger",
      Resources: [context.invokedFunctionArn],
    },
  ],
});
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
Posted by: the-noob