S3FileItemReaderProps Struct
Base interface for Item Reader configuration properties the iterate over entries in a S3 file.
Example
ts
import * as s3 from 'aws-cdk-lib/aws-s3';
/**
* Tree view of bucket:
* my-bucket
* |
* +--input.json
* |
* ...
*
* File content of input.json:
* [
* "item1",
* "item2"
* ]
*/
const bucket = new s3.Bucket(this, 'Bucket', {
bucketName: 'my-bucket',
});
const distributedMap = new sfn.DistributedMap(this, 'DistributedMap', {
itemReader: new sfn.S3JsonItemReader({
bucket,
key: 'input.json',
}),
});
distributedMap.itemProcessor(new sfn.Pass(this, 'Pass'));
Properties
bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucket= S3 bucket will be determined fro…#S3 Bucket containing objects to iterate over or a file with a list to iterate over.
default
Default: S3 bucket will be determined from
bucketNamePathstringbucket_name_pathstrbucketNamePathStringBucketNamePathstringBucketNamePath*string= S3 bucket will be determined fro…#S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
default
Default: S3 bucket will be determined from
Key of file stored in S3 bucket containing an array to iterate over.
maxItemsnumbermax_itemsint | floatmaxItemsNumberMaxItemsdoubleMaxItems*float64= Distributed Map state will itera…#Limits the number of items passed to the Distributed Map state.
default
Default: Distributed Map state will iterate over all items provided by the ItemReader