Skip to content

fix(bb-cron-job): grant scheduler role access to all computes - #517

Open
ikenyal wants to merge 1 commit into
aws-devtools-labs:mainfrom
ikenyal:fix/cronjob-scheduler-role-grants
Open

fix(bb-cron-job): grant scheduler role access to all computes#517
ikenyal wants to merge 1 commit into
aws-devtools-labs:mainfrom
ikenyal:fix/cronjob-scheduler-role-grants

Conversation

@ikenyal

@ikenyal ikenyal commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

After #459, CronJob correctly targets its resolved Lambda compute. The Scheduler IAM role remains shared per stack, however, and only receives lambda:InvokeFunction for the first CronJob target. A later CronJob targeting a different resolved Lambda synthesizes a correct schedule target but lacks permission for EventBridge Scheduler to invoke it.

Issue #: N/A

Changes

  • Track the Lambda ARNs already granted to the shared Scheduler role.
  • Add one lambda:InvokeFunction grant for each distinct CronJob target compute while preserving the existing single shared role per stack.
  • Add a synth regression test with default and scoped Lambda computes that verifies the shared Scheduler role policy includes both targets.
  • Add a patch changeset for @aws-blocks/bb-cron-job.

Validation

  • npm run build --workspace @aws-blocks/bb-cron-job
  • npm test --workspace @aws-blocks/bb-cron-job (65 passing)
  • npm run lint
  • npm run lint:deps
  • npx changeset status --since=origin/main
  • git diff --check

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (not applicable: this fixes internal IAM synthesis behavior without changing the public API)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ikenyal
ikenyal requested a review from a team as a code owner September 8, 2026 21:18
@changeset-bot

changeset-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0ba429b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-blocks/bb-cron-job Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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