Skip to content

Comments

Added the ability to set constants when scheduling a Lambda function Cloudwatch event.#364

Closed
svanhart wants to merge 1 commit intomotdotla:masterfrom
svanhart:add_inputs_to_event_target
Closed

Added the ability to set constants when scheduling a Lambda function Cloudwatch event.#364
svanhart wants to merge 1 commit intomotdotla:masterfrom
svanhart:add_inputs_to_event_target

Conversation

@svanhart
Copy link

@svanhart svanhart commented Aug 2, 2017

I needed the ability to pass variables to a Lambda function from a Cloudwatch event so that depending upon when the event was triggered would dictate which path the code takes.

Copy link
Collaborator

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

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

one small nit and one backward compatibility comment.

Thanks for taking the time to make node-lambda better 👍

Arn: params.FunctionArn,
Id: this._functionName(params)
Id: this._functionName(params),
Input: JSON.stringify(params.Input)
Copy link
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) : ""

"ScheduleExpression": "rate(1 hour)",
"Input":
{
"key": "value",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: key1?

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