The AWS region tied to your Lambda, e.g us-east-1 or us-west-2
The name of your Lambda function. Also accepts a function ARN
A variable reference to the event data you want to send to the event bus (e.g. event.body)
async
(params, auths) => {
}
const AWS = require('aws-sdk')
const { accessKeyId, secretAccessKey } = auths.aws
const { region, FunctionName, eventData } = params
const lambda = new AWS.Lambda({
accessKeyId,
secretAccessKey,
region
})
// This invokes the Lambda synchronously so you can view the response
// details associated with each invocation. This can be changed. See
// https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#invoke-property
// This also assumes the eventData passed to the step is JSON.
// Please modify the code accordingly if your data is in a different format.
const lambdaParams = {
Payload: JSON.stringify(eventData),
FunctionName,
InvocationType: "RequestResponse",
LogType: "Tail",
}
this.res = await lambda.invoke(lambdaParams).promise()