Skip to content

[4.x] Fix Lambda permission SourceArn for the default event bus - #428

Merged
GrahamCampbell merged 1 commit into
4.xfrom
fix-eventbridge-default-bus-source-arn
Aug 4, 2026
Merged

[4.x] Fix Lambda permission SourceArn for the default event bus#428
GrahamCampbell merged 1 commit into
4.xfrom
fix-eventbridge-default-bus-source-arn

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Contributor

When an eventBridge event is configured with an explicit eventBus: default, the generated AWS::Lambda::Permission included a spurious default/ segment in its SourceArn condition, producing rule/default/<rule-name>. AWS assigns rules on the default bus an ARN with no bus segment (rule/<rule-name>), so the ArnLike condition never matched and EventBridge was silently denied invoking the function on every invocation, with no error at deploy time. Events with eventBus omitted and named or custom buses were unaffected.

The SourceArn now omits the bus segment for the default bus, mirroring the existing special case for EventBusName on the rule resource. The default-bus tests now assert the full SourceArn value instead of a single path segment, and coverage is added for a custom-named rule on the default bus. Fixes #426 and supersedes #427; thanks to @james-at-tem for the diagnosis and the original patch, credited as co-author.

Co-authored-by: james-at-tem <james.hallam@tem.energy>
@GrahamCampbell GrahamCampbell changed the title Fix Lambda permission SourceArn for the default event bus [4.x] Fix Lambda permission SourceArn for the default event bus Aug 4, 2026
@GrahamCampbell
GrahamCampbell merged commit cc42967 into 4.x Aug 4, 2026
8 checks passed
@GrahamCampbell
GrahamCampbell deleted the fix-eventbridge-default-bus-source-arn branch August 4, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EventBridge Lambda permission SourceArn is wrong for the default event bus, causing 100% silent invocation failures

1 participant