@aws-cdk_aws-kinesisfirehose-alpha.LambdaFunctionProcessor

class LambdaFunctionProcessor ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.KinesisFirehose.Alpha.LambdaFunctionProcessor
Gogithub.com/aws/aws-cdk-go/awscdkkinesisfirehosealpha/v2#LambdaFunctionProcessor
Javasoftware.amazon.awscdk.services.kinesisfirehose.alpha.LambdaFunctionProcessor
Pythonaws_cdk.aws_kinesisfirehose_alpha.LambdaFunctionProcessor
TypeScript (source)@aws-cdk/aws-kinesisfirehose-alpha ยป LambdaFunctionProcessor

Implements IDataProcessor

Use an AWS Lambda function to transform records.

Example

// Provide a Lambda function that will transform records before delivery, with custom
// buffering and retry configuration
const lambdaFunction = new lambda.Function(this, 'Processor', {
  runtime: lambda.Runtime.NODEJS_14_X,
  handler: 'index.handler',
  code: lambda.Code.fromAsset(path.join(__dirname, 'process-records')),
});
const lambdaProcessor = new firehose.LambdaFunctionProcessor(lambdaFunction, {
  bufferInterval: Duration.minutes(5),
  bufferSize: Size.mebibytes(5),
  retries: 5,
});
declare const bucket: s3.Bucket;
const s3Destination = new destinations.S3Bucket(bucket, {
  processor: lambdaProcessor,
});
new firehose.DeliveryStream(this, 'Delivery Stream', {
  destinations: [s3Destination],
});

Initializer

new LambdaFunctionProcessor(lambdaFunction: IFunction, props?: DataProcessorProps)

Parameters

  • lambdaFunction IFunction
  • props DataProcessorProps โ€” The constructor props of the DataProcessor.

Properties

NameTypeDescription
props๐Ÿ”นDataProcessorPropsThe constructor props of the LambdaFunctionProcessor.

props๐Ÿ”น

Type: DataProcessorProps

The constructor props of the LambdaFunctionProcessor.

Methods

NameDescription
bind(_scope, options)๐Ÿ”นBinds this processor to a destination of a delivery stream.

bind(_scope, options)๐Ÿ”น

public bind(_scope: Construct, options: DataProcessorBindOptions): DataProcessorConfig

Parameters

  • _scope Construct
  • options DataProcessorBindOptions

Returns

  • DataProcessorConfig

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.