# S3ManifestItemReader

Item Reader configuration for iterating over items in a S3 inventory manifest file stored in S3.

Extends: S3ManifestItemReader
Implements: IItemReader

- Source: [`aws-stepfunctions/lib/states/distributed-map/item-reader.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/distributed-map/item-reader.ts#L479)
- Type last changed: v2.180.0 · 21 Feb 2025

## Example

```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 s3ManifestItemReader = new stepfunctions.S3ManifestItemReader({
  key: 'key',

  // the properties below are optional
  bucket: bucket,
  bucketNamePath: 'bucketNamePath',
  maxItems: 123,
});
```

## Initializer

```ts
new S3ManifestItemReader(props: S3FileItemReaderProps)
```

## Properties

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

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

- `key`: string — S3 key of a file with a list to iterate over.

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

  **Default:** No maxItems

- `resource`: string — ARN for the `getObject` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.

## Methods

- `providePolicyStatements(): PolicyStatement[]` — Compile policy statements to provide relevent permissions to the state machine.

- `render(queryLanguage?: QueryLanguage): any` — Renders the ItemReader configuration as JSON object.

  **Returns:** - JSON object

- `validateItemReader(): string[]` — Validate that ItemReader contains exactly either.
