S3ObjectsItemReaderProps Struct
Properties for configuring an Item Reader that iterates over objects in an S3 bucket.
Example
ts
import * as s3 from 'aws-cdk-lib/aws-s3';
/**
* Tree view of bucket:
* my-bucket
* |
* +--item1
* |
* +--otherItem
* |
* +--item2
* |
* ...
*/
const bucket = new s3.Bucket(this, 'Bucket', {
bucketName: 'my-bucket',
});
const distributedMap = new sfn.DistributedMap(this, 'DistributedMap', {
itemReader: new sfn.S3ObjectsItemReader({
bucket,
prefix: 'item',
}),
});
distributedMap.itemProcessor(new sfn.Pass(this, 'Pass'));
Properties
bucketoptionalIBucketbucketoptionalIBucketbucketoptionalIBucketBucketoptionalIBucketBucketoptionalIBucket#S3 Bucket containing objects to iterate over or a file with a list to iterate over.
Default: S3 bucket will be determined from
bucketNamePathoptionalstringbucket_name_pathoptionalstrbucketNamePathoptionalStringBucketNamePathoptionalstringBucketNamePathoptional*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
maxItemsoptionalnumbermax_itemsoptionalint | floatmaxItemsoptionalNumberMaxItemsoptionaldoubleMaxItemsoptional*float64#Limits the number of items passed to the Distributed Map state.
Default: Distributed Map state will iterate over all items provided by the ItemReader
S3 prefix used to limit objects to iterate over.
Default: No prefix