# ItemReaderProps

Base interface for Item Reader configuration properties.

- Source: [`aws-stepfunctions/lib/states/distributed-map/item-reader.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/distributed-map/item-reader.ts#L53)
- Type last changed: v2.163.0 · 22 Oct 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const bucket: s3.Bucket;
const itemReaderProps: stepfunctions.ItemReaderProps = {
  bucket: bucket,
  bucketNamePath: 'bucketNamePath',
  maxItems: 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_s3 as s3
from aws_cdk import aws_stepfunctions as stepfunctions

# bucket: s3.Bucket

item_reader_props = stepfunctions.ItemReaderProps(
    bucket=bucket,
    bucket_name_path="bucketNamePath",
    max_items=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.s3.*;
import software.amazon.awscdk.services.stepfunctions.*;

Bucket bucket;

ItemReaderProps itemReaderProps = ItemReaderProps.builder()
        .bucket(bucket)
        .bucketNamePath("bucketNamePath")
        .maxItems(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.S3;
using Amazon.CDK.AWS.StepFunctions;

Bucket bucket;

var itemReaderProps = new ItemReaderProps {
    Bucket = bucket,
    BucketNamePath = "bucketNamePath",
    MaxItems = 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"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket Bucket

itemReaderProps := &ItemReaderProps{
	Bucket: bucket,
	BucketNamePath: jsii.String("bucketNamePath"),
	MaxItems: jsii.Number(123),
}
```

## Properties

- `bucket`: [IBucket](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html) — S3 Bucket containing objects to iterate over or a file with a list to iterate over.

  **Default:** S3 bucket will be determined from

- `bucketNamePath`: string — S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.

  **Default:** S3 bucket will be determined from

- `maxItems`: number — Limits the number of items passed to the Distributed Map state.

  **Default:** Distributed Map state will iterate over all items provided by the ItemReader
