Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion lib/event_sources.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
{
"ScheduleName": "node-lambda-test-schedule",
"ScheduleState": "ENABLED",
"ScheduleExpression": "rate(1 hour)"
"ScheduleExpression": "rate(1 hour)",
"Input":
{
"key": "value",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: key1?

"key2": "value"
}
}
]
}
3 changes: 2 additions & 1 deletion lib/schedule_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class ScheduleEvents {
Rule: params.ScheduleName,
Targets: [{
Arn: params.FunctionArn,
Id: this._functionName(params)
Id: this._functionName(params),
Input: JSON.stringify(params.Input)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to have this backwards compatible by making this optional, i.e. params.hasOwnProperty('Input') ? JSON.stringify(params.Input) : ""

}]
}
}
Expand Down