# PipeSourceDynamoDBStreamParametersProperty

The parameters for using a DynamoDB stream as a source.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_pipes as pipes } from 'aws-cdk-lib';
const pipeSourceDynamoDBStreamParametersProperty: pipes.CfnPipe.PipeSourceDynamoDBStreamParametersProperty = {
  startingPosition: 'startingPosition',

  // the properties below are optional
  batchSize: 123,
  deadLetterConfig: {
    arn: 'arn',
  },
  maximumBatchingWindowInSeconds: 123,
  maximumRecordAgeInSeconds: 123,
  maximumRetryAttempts: 123,
  onPartialBatchItemFailure: 'onPartialBatchItemFailure',
  parallelizationFactor: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_pipes as pipes

pipe_source_dynamo_db_stream_parameters_property = pipes.CfnPipe.PipeSourceDynamoDBStreamParametersProperty(
    starting_position="startingPosition",

    # the properties below are optional
    batch_size=123,
    dead_letter_config=pipes.CfnPipe.DeadLetterConfigProperty(
        arn="arn"
    ),
    maximum_batching_window_in_seconds=123,
    maximum_record_age_in_seconds=123,
    maximum_retry_attempts=123,
    on_partial_batch_item_failure="onPartialBatchItemFailure",
    parallelization_factor=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.pipes.*;

PipeSourceDynamoDBStreamParametersProperty pipeSourceDynamoDBStreamParametersProperty = PipeSourceDynamoDBStreamParametersProperty.builder()
        .startingPosition("startingPosition")

        // the properties below are optional
        .batchSize(123)
        .deadLetterConfig(DeadLetterConfigProperty.builder()
                .arn("arn")
                .build())
        .maximumBatchingWindowInSeconds(123)
        .maximumRecordAgeInSeconds(123)
        .maximumRetryAttempts(123)
        .onPartialBatchItemFailure("onPartialBatchItemFailure")
        .parallelizationFactor(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Pipes;

var pipeSourceDynamoDBStreamParametersProperty = new PipeSourceDynamoDBStreamParametersProperty {
    StartingPosition = "startingPosition",

    // the properties below are optional
    BatchSize = 123,
    DeadLetterConfig = new DeadLetterConfigProperty {
        Arn = "arn"
    },
    MaximumBatchingWindowInSeconds = 123,
    MaximumRecordAgeInSeconds = 123,
    MaximumRetryAttempts = 123,
    OnPartialBatchItemFailure = "onPartialBatchItemFailure",
    ParallelizationFactor = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

pipeSourceDynamoDBStreamParametersProperty := &PipeSourceDynamoDBStreamParametersProperty{
	StartingPosition: jsii.String("startingPosition"),

	// the properties below are optional
	BatchSize: jsii.Number(123),
	DeadLetterConfig: &DeadLetterConfigProperty{
		Arn: jsii.String("arn"),
	},
	MaximumBatchingWindowInSeconds: jsii.Number(123),
	MaximumRecordAgeInSeconds: jsii.Number(123),
	MaximumRetryAttempts: jsii.Number(123),
	OnPartialBatchItemFailure: jsii.String("onPartialBatchItemFailure"),
	ParallelizationFactor: jsii.Number(123),
}
```

## Properties

- `batchSize`: number — The maximum number of records to include in each batch.

- `deadLetterConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPipe.DeadLetterConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pipes.CfnPipe.DeadLetterConfigProperty.html) — Define the target queue to send dead-letter queue events to.

- `maximumBatchingWindowInSeconds`: number — The maximum length of a time to wait for events.

- `maximumRecordAgeInSeconds`: number — Discard records older than the specified age.

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

- `maximumRetryAttempts`: number — Discard records after the specified number of retries.

  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.

- `onPartialBatchItemFailure`: string — Define how to handle item process failures.

  `AUTOMATIC_BISECT` halves each batch and retry each half until all the records are processed or there is one failed message left in the batch.

- `parallelizationFactor`: number — The number of batches to process concurrently from each shard.

  The default value is 1.

- `startingPosition`: string (required) — (Streams only) The position in a stream from which to start reading.

  *Valid values* : `TRIM_HORIZON | LATEST`
