Skip to content
v2.278.0

Experimental

@aws-cdk/aws-pipes-sources-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

KinesisSourceParameters Struct ​

Parameters for the Kinesis source.

Example ​

ts
declare const sourceStream: kinesis.Stream;
declare const targetQueue: sqs.Queue;

const pipeSource = new sources.KinesisSource(sourceStream, {
  startingPosition: sources.KinesisStartingPosition.LATEST,
});

const pipe = new pipes.Pipe(this, 'Pipe', {
  source: pipeSource,
  target: new SqsTarget(targetQueue)
});
python
# source_stream: kinesis.Stream
# target_queue: sqs.Queue


pipe_source = sources.KinesisSource(source_stream,
    starting_position=sources.KinesisStartingPosition.LATEST
)

pipe = pipes.Pipe(self, "Pipe",
    source=pipe_source,
    target=SqsTarget(target_queue)
)
java
Stream sourceStream;
Queue targetQueue;


KinesisSource pipeSource = KinesisSource.Builder.create(sourceStream)
        .startingPosition(KinesisStartingPosition.LATEST)
        .build();

Pipe pipe = Pipe.Builder.create(this, "Pipe")
        .source(pipeSource)
        .target(new SqsTarget(targetQueue))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Sources.Alpha
Stream sourceStream;
Queue targetQueue;


var pipeSource = new KinesisSource(sourceStream, new KinesisSourceParameters {
    StartingPosition = KinesisStartingPosition.LATEST
});

var pipe = new Pipe(this, "Pipe", new PipeProps {
    Source = pipeSource,
    Target = new SqsTarget(targetQueue)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipessourcesalpha/v2
var sourceStream Stream
var targetQueue Queue


pipeSource := sources.NewKinesisSource(sourceStream, &KinesisSourceParameters{
	StartingPosition: sources.KinesisStartingPosition_LATEST,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: pipeSource,
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
})

Properties ​

batchSizeoptionalnumberbatch_sizeoptionalint | floatbatchSizeoptionalNumberBatchSizeoptionaldoubleBatchSizeoptional*float64 = 1 #
The maximum number of records to include in each batch.
deadLetterTargetoptionalIQueue | ITopicdead_letter_targetoptionaltyping.Union[IQueue, ITopic]deadLetterTargetoptionalIQueueDeadLetterTargetoptionalIQueueDeadLetterTargetoptionalinterface{} #
Define the target to send dead-letter queue events to.

Default: no dead-letter queue or topic

notes

The dead-letter queue stores any events that are not successfully delivered to a Pipes target after all retry attempts are exhausted. You can then resolve the issue that caused the failed invocations and replay the events at a later time. In some cases, such as when access is denied to a resource, events are sent directly to the dead-letter queue and are not retried.

maximumBatchingWindowoptionalDurationmaximum_batching_windowoptionalDurationmaximumBatchingWindowoptionalDurationMaximumBatchingWindowoptionalDurationMaximumBatchingWindowoptionalDuration #
The maximum length of a time to wait for events.

Default: the events will be handled immediately

maximumRecordAgeoptionalDurationmaximum_record_ageoptionalDurationmaximumRecordAgeoptionalDurationMaximumRecordAgeoptionalDurationMaximumRecordAgeoptionalDuration #
Discard records older than the specified age.

Default: -1 - EventBridge won't discard old records

The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, EventBridge never discards old records.

maximumRetryAttemptsoptionalnumbermaximum_retry_attemptsoptionalint | floatmaximumRetryAttemptsoptionalNumberMaximumRetryAttemptsoptionaldoubleMaximumRetryAttemptsoptional*float64 #
Discard records after the specified number of retries.

Default: -1 - EventBridge will retry failed records until the record expires in the event source

The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, EventBridge retries failed records until the record expires in the event source.

onPartialBatchItemFailureoptionalOnPartialBatchItemFailureon_partial_batch_item_failureoptionalOnPartialBatchItemFailureonPartialBatchItemFailureoptionalOnPartialBatchItemFailureOnPartialBatchItemFailureoptionalOnPartialBatchItemFailureOnPartialBatchItemFailureoptionalOnPartialBatchItemFailure #
Define how to handle item process failures.

Default: off - EventBridge will retry the entire batch

{@link OnPartialBatchItemFailure.AUTOMATIC_BISECT} halves each batch and will retry each half until all the records are processed or there is one failed message left in the batch.

parallelizationFactoroptionalnumberparallelization_factoroptionalint | floatparallelizationFactoroptionalNumberParallelizationFactoroptionaldoubleParallelizationFactoroptional*float64 = 1 #
The number of batches to process concurrently from each shard.
startingPositionKinesisStartingPositionstarting_positionKinesisStartingPositionstartingPositionKinesisStartingPositionStartingPositionKinesisStartingPositionStartingPositionKinesisStartingPosition required #
The position in a stream from which to start reading.
startingPositionTimestampoptionaldatestarting_position_timestampoptionaldatetimestartingPositionTimestampoptionalInstantStartingPositionTimestampoptionalDateTimeStartingPositionTimestampoptional*time.Time #
With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in ISO 8601 format.

Default: no starting position timestamp

example
ts
new Date(Date.UTC(1969, 10, 20, 0, 0, 0))