Class LambdaFunctionProcessor

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.kinesisfirehose.alpha.LambdaFunctionProcessor
All Implemented Interfaces:
IDataProcessor, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-11T18:01:25.731Z") @Stability(Experimental) public class LambdaFunctionProcessor extends software.amazon.jsii.JsiiObject implements IDataProcessor
(experimental) Use an AWS Lambda function to transform records.

Example:

 Bucket bucket;
 // Provide a Lambda function that will transform records before delivery, with custom
 // buffering and retry configuration
 Function lambdaFunction = Function.Builder.create(this, "Processor")
         .runtime(Runtime.NODEJS_LATEST)
         .handler("index.handler")
         .code(Code.fromAsset(join(__dirname, "process-records")))
         .build();
 LambdaFunctionProcessor lambdaProcessor = LambdaFunctionProcessor.Builder.create(lambdaFunction)
         .bufferInterval(Duration.minutes(5))
         .bufferSize(Size.mebibytes(5))
         .retries(5)
         .build();
 S3Bucket s3Destination = S3Bucket.Builder.create(bucket)
         .processor(lambdaProcessor)
         .build();
 DeliveryStream.Builder.create(this, "Delivery Stream")
         .destinations(List.of(s3Destination))
         .build();
 
  • Constructor Details

    • LambdaFunctionProcessor

      protected LambdaFunctionProcessor(software.amazon.jsii.JsiiObjectRef objRef)
    • LambdaFunctionProcessor

      protected LambdaFunctionProcessor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • LambdaFunctionProcessor

      @Stability(Experimental) public LambdaFunctionProcessor(@NotNull IFunction lambdaFunction, @Nullable DataProcessorProps props)
      Parameters:
      lambdaFunction - This parameter is required.
      props - The constructor props of the DataProcessor.
    • LambdaFunctionProcessor

      @Stability(Experimental) public LambdaFunctionProcessor(@NotNull IFunction lambdaFunction)
      Parameters:
      lambdaFunction - This parameter is required.
  • Method Details

    • bind

      @Stability(Experimental) @NotNull public DataProcessorConfig bind(@NotNull software.constructs.Construct _scope, @NotNull DataProcessorBindOptions options)
      (experimental) Binds this processor to a destination of a delivery stream.

      Implementers should use this method to grant processor invocation permissions to the provided stream and return the necessary configuration to register as a processor.

      Specified by:
      bind in interface IDataProcessor
      Parameters:
      _scope - This parameter is required.
      options - This parameter is required.
    • getProps

      @Stability(Experimental) @NotNull public DataProcessorProps getProps()
      (experimental) The constructor props of the LambdaFunctionProcessor.
      Specified by:
      getProps in interface IDataProcessor