Skip to content

add optional roleArn support for scheduler schedules#143

Merged
mnapoli merged 1 commit intooss-serverless:mainfrom
jerolan:main
Feb 23, 2026
Merged

add optional roleArn support for scheduler schedules#143
mnapoli merged 1 commit intooss-serverless:mainfrom
jerolan:main

Conversation

@jerolan
Copy link
Contributor

@jerolan jerolan commented Feb 21, 2026

The reason behind this PR is that my team and I identified a security issue in allowing a role that was created for a specific purpose to be modified to serve a completely different one, giving whoever assumed that role permissions beyond the minimum they should have had.

Summary

  • add optional schedule.roleArn support for method: scheduler
  • keep existing behavior as default fallback to the function execution role when roleArn is not provided
  • document the new option in schedule event docs
  • update TypeScript types for schedule event configuration

Changes

  • extend schedule event schema to accept roleArn (string or CloudFormation function)
  • set scheduler target RoleArn from schedule.roleArn when present, otherwise fallback to function role
  • verifies tests for both paths:
    • explicit scheduler role
    • fallback to function role

@jerolan jerolan changed the title feat(schedule): add optional roleArn support for scheduler schedules add optional roleArn support for scheduler schedules Feb 21, 2026
@mnapoli
Copy link
Contributor

mnapoli commented Feb 23, 2026

Thanks!

@mnapoli mnapoli merged commit 1b00b1c into oss-serverless:main Feb 23, 2026
3 checks passed
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.

2 participants