Class LambdaFunctionProcessor
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.kinesisfirehose.LambdaFunctionProcessor
- All Implemented Interfaces:
IDataProcessor
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.120Z")
@Stability(Experimental)
public class LambdaFunctionProcessor
extends software.amazon.jsii.JsiiObject
implements IDataProcessor
(experimental) Use an AWS Lambda function to transform records.
Example:
import path.*; import software.amazon.awscdk.services.kinesisfirehose.*; import software.amazon.awscdk.services.kms.*; import software.amazon.awscdk.services.lambda.nodejs.*; import software.amazon.awscdk.services.logs.*; import software.amazon.awscdk.services.s3.*; import software.amazon.awscdk.core.*; import software.amazon.awscdk.services.kinesisfirehose.destinations.*; App app = new App(); Stack stack = new Stack(app, "aws-cdk-firehose-delivery-stream-s3-all-properties"); Bucket bucket = Bucket.Builder.create(stack, "Bucket") .removalPolicy(RemovalPolicy.DESTROY) .autoDeleteObjects(true) .build(); Bucket backupBucket = Bucket.Builder.create(stack, "BackupBucket") .removalPolicy(RemovalPolicy.DESTROY) .autoDeleteObjects(true) .build(); LogGroup logGroup = LogGroup.Builder.create(stack, "LogGroup") .removalPolicy(RemovalPolicy.DESTROY) .build(); NodejsFunction dataProcessorFunction = NodejsFunction.Builder.create(stack, "DataProcessorFunction") .entry(join(__dirname, "lambda-data-processor.js")) .timeout(Duration.minutes(1)) .build(); LambdaFunctionProcessor processor = LambdaFunctionProcessor.Builder.create(dataProcessorFunction) .bufferInterval(Duration.seconds(60)) .bufferSize(Size.mebibytes(1)) .retries(1) .build(); Key key = Key.Builder.create(stack, "Key") .removalPolicy(RemovalPolicy.DESTROY) .build(); Key backupKey = Key.Builder.create(stack, "BackupKey") .removalPolicy(RemovalPolicy.DESTROY) .build(); DeliveryStream.Builder.create(stack, "Delivery Stream") .destinations(List.of(S3Bucket.Builder.create(bucket) .logging(true) .logGroup(logGroup) .processor(processor) .compression(Compression.GZIP) .dataOutputPrefix("regularPrefix") .errorOutputPrefix("errorPrefix") .bufferingInterval(Duration.seconds(60)) .bufferingSize(Size.mebibytes(1)) .encryptionKey(key) .s3Backup(DestinationS3BackupProps.builder() .mode(BackupMode.ALL) .bucket(backupBucket) .compression(Compression.ZIP) .dataOutputPrefix("backupPrefix") .errorOutputPrefix("backupErrorPrefix") .bufferingInterval(Duration.seconds(60)) .bufferingSize(Size.mebibytes(1)) .encryptionKey(backupKey) .build()) .build())) .build(); app.synth();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forLambdaFunctionProcessor
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.kinesisfirehose.IDataProcessor
IDataProcessor.Jsii$Default, IDataProcessor.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionLambdaFunctionProcessor
(IFunction lambdaFunction) LambdaFunctionProcessor
(IFunction lambdaFunction, DataProcessorProps props) protected
LambdaFunctionProcessor
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
LambdaFunctionProcessor
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(software.constructs.Construct _scope, DataProcessorBindOptions options) (experimental) Binds this processor to a destination of a delivery stream.getProps()
(experimental) The constructor props of the LambdaFunctionProcessor.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
-
-
LambdaFunctionProcessor
- 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 interfaceIDataProcessor
- Parameters:
_scope
- This parameter is required.options
- This parameter is required.
-
getProps
(experimental) The constructor props of the LambdaFunctionProcessor.- Specified by:
getProps
in interfaceIDataProcessor
-