Interface ILambdaInvokeProps
Properties for invoking a Lambda function with LambdaInvoke.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILambdaInvokeProps : ITaskStateBaseProps
Syntax (vb)
Public Interface ILambdaInvokeProps
Inherits ITaskStateBaseProps
Remarks
ExampleMetadata: infused
Examples
Function fn;
new LambdaInvoke(this, "Invoke with empty object as payload", new LambdaInvokeProps {
LambdaFunction = fn,
Payload = TaskInput.FromObject(new Dictionary<string, object> { })
});
// use the output of fn as input
// use the output of fn as input
new LambdaInvoke(this, "Invoke with payload field in the state input", new LambdaInvokeProps {
LambdaFunction = fn,
Payload = TaskInput.FromJsonPathAt("$.Payload")
});
Synopsis
Properties
ClientContext | Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function. |
InvocationType | Invocation type of the Lambda function. |
LambdaFunction | Lambda function to invoke. |
Payload | The JSON that will be supplied as input to the Lambda function. |
PayloadResponseOnly | Invoke the Lambda in a way that only returns the payload response without additional metadata. |
Qualifier | (deprecated) Version or alias to invoke a published version of the function. |
RetryOnServiceExceptions | Whether to retry on Lambda service exceptions. |
Properties
ClientContext
Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function.
virtual string ClientContext { get; }
Property Value
System.String
Remarks
Default: - No context
InvocationType
Invocation type of the Lambda function.
virtual Nullable<LambdaInvocationType> InvocationType { get; }
Property Value
System.Nullable<LambdaInvocationType>
Remarks
Default: InvocationType.REQUEST_RESPONSE
LambdaFunction
Payload
The JSON that will be supplied as input to the Lambda function.
virtual TaskInput Payload { get; }
Property Value
Remarks
Default: - The state input (JSON path '$')
PayloadResponseOnly
Invoke the Lambda in a way that only returns the payload response without additional metadata.
virtual Nullable<bool> PayloadResponseOnly { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
The payloadResponseOnly
property cannot be used if integrationPattern
, invocationType
,
clientContext
, or qualifier
are specified.
It always uses the REQUEST_RESPONSE behavior.
Default: false
Qualifier
(deprecated) Version or alias to invoke a published version of the function.
virtual string Qualifier { get; }
Property Value
System.String
Remarks
You only need to supply this if you want the version of the Lambda Function to depend
on data in the state machine state. If not, you can pass the appropriate Alias or Version object
directly as the lambdaFunction
argument.
Default: - Version or alias inherent to the lambdaFunction
object.
Stability: Deprecated
RetryOnServiceExceptions
Whether to retry on Lambda service exceptions.
virtual Nullable<bool> RetryOnServiceExceptions { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
This handles Lambda.ServiceException
, Lambda.AWSLambdaException
and
Lambda.SdkClientException
with an interval of 2 seconds, a back-off rate
of 2 and 6 maximum attempts.
Default: true
See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html