Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

Run Lambda Function With Data

Prev Next
Step Details
Introduced in Version8.0.0
Last Modified in Version9.0.0
LocationIntegration > Amazon AWS > Lambda

The Run Lambda Function With Data step is used to execute a Lambda Function while providing it with specific payload data in JSON format. This enables you to pass information or parameters to the Lambda Function, which can be used by the Function during its execution.

Prerequisites 


Properties

Inputs

PropertyDescriptionData Type
Allow Use Default AWSCredsToggle permitting the use of default AWS account credentials.Bolean
Function NameName of the Lambda function to name.String
Payload Data JSONInputted payload data as provided in JSON format.String
RegionAWS Region associated with the designated Lambda function.AmazonAWSRegion
TimeoutTime frame it takes for function to stop working.TimeSpan

Outputs

PropertyDescriptionData Type
DoneOutputs step completed information.                                                               String


Common Errors

Could Not Parse Payload into JSON

If the Payload Data JSON input is invalid, the step will cause an error.

To correct this, change the input to be valid and properly arranged JSON.

Exception Message:

DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Run Lamba Function With Data 1[RunLambaFunctionWithData] in flow [Step Library Flow]: Exception invoking method RunLambaFunctionWithData on class LambdaSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method RunLambaFunctionWithData on class LambdaSteps
 ---> Amazon.Lambda.Model.InvalidRequestContentException: Could not parse request body into json: Could not parse payload into json: Unrecognized token 'apple': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 7]
 ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown. at Amazon.Runtime.HttpWebRequestMessage.ProcessHttpResponseMessage(HttpResponseMessage responseMessage)
 at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
 at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
   --- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream)
 at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)
 at Amazon.Runtime.Internal.ExceptionHandler`1.HandleAsync(IExecutionContext executionContext, Exception exception)
 at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception)
 at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
 at Decisions.AWS.Lambda.LambdaSteps.RunLambaFunctionWithData(String FunctionName, String PayloadDataJSON, AmazonAWSRegion Region, Boolean AllowUseDefaultAWSCreds, Nullable`1 timeout)
 at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data)
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData)
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Step Changes


VersionRelease DateDeveloper Task
Timeout property added.
9.6
January 2025
[DT-042821]


Related Information


Related Articles:

Lambda