Skip to content

[3.x] Fix Lambda permission SourceArn for default event bus - #429

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

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

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Contributor

This applies the same fix as #428 to the 3.x branch, where the bug is also present (refs #426). 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, so the ArnLike condition never matched the real rule ARN (rule/<rule-name>) and EventBridge was silently denied invoking the function on every invocation. The SourceArn now omits the bus segment for the default bus, the default-bus tests assert the full SourceArn value, and coverage is added for a custom-named rule on the default bus.

The deprecated custom-resources path is not affected in the same silent way, since an explicit eventBus: default there already fails loudly at deploy time when the custom resource attempts to create the bus, so it is left untouched. 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 default event bus (3.x) [3.x] Fix Lambda permission SourceArn for default event bus Aug 4, 2026
@GrahamCampbell
GrahamCampbell merged commit b828d52 into 3.x Aug 4, 2026
8 checks passed
@GrahamCampbell
GrahamCampbell deleted the fix-eventbridge-default-bus-source-arn-3.x 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.

1 participant