LambdaDestinationOptions
- class aws_cdk.aws_lambda_destinations.LambdaDestinationOptions(*, response_only=None)
Bases:
objectOptions for a Lambda destination.
- Parameters:
response_only (
Optional[bool]) – Whether the destination function receives only theresponsePayloadof the source function. When set totrueand used asonSuccessdestination, the destination function will be invoked with the payload returned by the source function. When set totrueand used asonFailuredestination, the destination function will be invoked with the error object returned by source function. See the README of this module to see a full explanation of this option. Default: false The destination function receives the full invocation record.- ExampleMetadata:
infused
Example:
# Auto-extract response payload with a lambda destination # destination_fn: lambda.Function source_fn = lambda_.Function(self, "Source", runtime=lambda_.Runtime.NODEJS_LATEST, handler="index.handler", code=lambda_.Code.from_asset(path.join(__dirname, "lambda-handler")), # auto-extract on success on_success=destinations.LambdaDestination(destination_fn, response_only=True ) )
Attributes
- response_only
Whether the destination function receives only the
responsePayloadof the source function.When set to
trueand used asonSuccessdestination, the destination function will be invoked with the payload returned by the source function.When set to
trueand used asonFailuredestination, the destination function will be invoked with the error object returned by source function.See the README of this module to see a full explanation of this option.
- Default:
false The destination function receives the full invocation record.