S3FileItemReaderProps
- class aws_cdk.aws_stepfunctions.S3FileItemReaderProps(*, bucket=None, bucket_name_path=None, max_items=None, key)
Bases:
ItemReaderProps
Base interface for Item Reader configuration properties the iterate over entries in a S3 file.
- Parameters:
bucket (
Optional
[IBucket
]) – S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined frombucket_name_path (
Optional
[str
]) – 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 frommax_items (
Union
[int
,float
,None
]) – Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReaderkey (
str
) – Key of file stored in S3 bucket containing an array to iterate over.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_s3 as s3 # # Tree view of bucket: # my-bucket # | # +--input.json # | # ... # # File content of input.json: # [ # "item1", # "item2" # ] # bucket = s3.Bucket(self, "Bucket", bucket_name="my-bucket" ) distributed_map = sfn.DistributedMap(self, "DistributedMap", item_reader=sfn.S3JsonItemReader( bucket=bucket, key="input.json" ) ) distributed_map.item_processor(sfn.Pass(self, "Pass"))
Attributes
- bucket
S3 Bucket containing objects to iterate over or a file with a list to iterate over.
- Default:
S3 bucket will be determined from
- See:
bucketNamePath
- bucket_name_path
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
- See:
bucket
- key
Key of file stored in S3 bucket containing an array to iterate over.
- max_items
Limits the number of items passed to the Distributed Map state.
- Default:
Distributed Map state will iterate over all items provided by the ItemReader