Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: support IAM role deleteSchedule
  • Loading branch information
geolffreym committed Oct 7, 2024
commit 8cfe5649c77fdfb877764803b2ca10a22ef10da1
7 changes: 4 additions & 3 deletions lib/deploy/stepFunctions/compileIamRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ function getEventBridgePermissions(state) {

function getEventBridgeSchedulerPermissions(action, state) {
const scheduleGroupName = state.Parameters.GroupName;
const scheduleTargetRoleArn = state.Parameters.Target.RoleArn;
const scheduleTargetRoleArn = state.Parameters?.Target?.RoleArn;

return [
{
Expand All @@ -575,10 +575,11 @@ function getEventBridgeSchedulerPermissions(action, state) {
],
},
},
{
// create schedule needs a target role arn
...(action.includes("CreateSchedule") ? {
action: 'iam:PassRole',
resource: scheduleTargetRoleArn,
},
} : {}),
];
}

Expand Down