interface S3FileItemReaderProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.S3FileItemReaderProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#S3FileItemReaderProps |
Java | software.amazon.awscdk.services.stepfunctions.S3FileItemReaderProps |
Python | aws_cdk.aws_stepfunctions.S3FileItemReaderProps |
TypeScript (source) | aws-cdk-lib » aws_stepfunctions » S3FileItemReaderProps |
Base interface for Item Reader configuration properties the iterate over entries in a S3 file.
Example
import * as s3 from 'aws-cdk-lib/aws-s3';
// create a bucket
const bucket = new s3.Bucket(this, 'Bucket');
const distributedMap = new sfn.DistributedMap(this, 'Distributed Map State', {
itemReader: new sfn.S3JsonItemReader({
bucket: bucket,
key: 'my-key.json',
}),
resultWriter: new sfn.ResultWriter({
bucket: bucket,
prefix: 'my-prefix',
})
});
distributedMap.itemProcessor(new sfn.Pass(this, 'Pass State'));
Properties
Name | Type | Description |
---|---|---|
bucket | IBucket | S3 Bucket containing objects to iterate over or a file with a list to iterate over. |
key | string | Key of file stored in S3 bucket containing an array to iterate over. |
max | number | Limits the number of items passed to the Distributed Map state. |
bucket
Type:
IBucket
S3 Bucket containing objects to iterate over or a file with a list to iterate over.
key
Type:
string
Key of file stored in S3 bucket containing an array to iterate over.
maxItems?
Type:
number
(optional, default: Distributed Map state will iterate over all items provided by the ItemReader)
Limits the number of items passed to the Distributed Map state.