class KinesisEventSource
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Lambda.EventSources.KinesisEventSource |
![]() | software.amazon.awscdk.services.lambda.eventsources.KinesisEventSource |
![]() | aws_cdk.aws_lambda_event_sources.KinesisEventSource |
![]() | @aws-cdk/aws-lambda-event-sources » KinesisEventSource |
Implements
IEvent
Extends
Stream
Use an Amazon Kinesis stream as an event source for AWS Lambda.
Example
import * as kinesis from '@aws-cdk/aws-kinesis';
import { KinesisEventSource } from '@aws-cdk/aws-lambda-event-sources';
const stream = new kinesis.Stream(this, 'MyStream');
declare const myFunction: lambda.Function;
myFunction.addEventSource(new KinesisEventSource(stream, {
batchSize: 100, // default
startingPosition: lambda.StartingPosition.TRIM_HORIZON,
}));
Initializer
new KinesisEventSource(stream: IStream, props: KinesisEventSourceProps)
Parameters
- stream
IStream
- props
Kinesis
Event Source Props
Properties
Name | Type | Description |
---|---|---|
event | string | The identifier for this EventSourceMapping. |
stream | IStream |
eventSourceMappingId
Type:
string
The identifier for this EventSourceMapping.
stream
Type:
IStream
Methods
Name | Description |
---|---|
bind(target) | Called by lambda.addEventSource to allow the event source to bind to this function. |
bind(target)
public bind(target: IFunction): void
Parameters
- target
IFunction
Called by lambda.addEventSource
to allow the event source to bind to this function.