class S3CsvItemReader
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.StepFunctions.S3CsvItemReader | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#S3CsvItemReader | 
|  Java | software.amazon.awscdk.services.stepfunctions.S3CsvItemReader | 
|  Python | aws_cdk.aws_stepfunctions.S3CsvItemReader | 
|  TypeScript (source) | aws-cdk-lib»aws_stepfunctions»S3CsvItemReader | 
Implements
IItem
Item Reader configuration for iterating over items in a CSV file stored in S3.
Example
// 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;
declare const csvHeaders: stepfunctions.CsvHeaders;
const s3CsvItemReader = new stepfunctions.S3CsvItemReader({
  key: 'key',
  // the properties below are optional
  bucket: bucket,
  bucketNamePath: 'bucketNamePath',
  csvDelimiter: stepfunctions.CsvDelimiter.COMMA,
  csvHeaders: csvHeaders,
  maxItems: 123,
});
Initializer
new S3CsvItemReader(props: S3CsvItemReaderProps)
Parameters
- props S3Csv Item Reader Props 
Properties
| Name | Type | Description | 
|---|---|---|
| bucket | IBucket | S3 Bucket containing a file with a list to iterate over. | 
| csv | Csv | CSV headers configuration. | 
| input | string | |
| key | string | S3 key of a file with a list to iterate over. | 
| resource | string | ARN for the getObjectmethod of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix. | 
| bucket | string | S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. | 
| csv | Csv | Delimiter used in CSV file. | 
| max | number | Limits the number of items passed to the Distributed Map state. | 
bucket
Type:
IBucket
S3 Bucket containing a file with a list to iterate over.
csvHeaders
Type:
Csv
CSV headers configuration.
inputType
Type:
string
key
Type:
string
S3 key of a file with a list to iterate over.
resource
Type:
string
ARN for the getObject method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
bucketNamePath?
Type:
string
(optional)
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
csvDelimiter?
Type:
Csv
(optional)
Delimiter used in CSV file.
maxItems?
Type:
number
(optional, default: No maxItems)
Limits the number of items passed to the Distributed Map state.
Methods
| Name | Description | 
|---|---|
| provide | Compile policy statements to provide relevent permissions to the state machine. | 
| render(queryLanguage?) | Renders the ItemReader configuration as JSON object. | 
| validate | Validate that ItemReader contains exactly either. | 
providePolicyStatements()  
public providePolicyStatements(): PolicyStatement[]
Returns
Compile policy statements to provide relevent permissions to the state machine.
render(queryLanguage?)
public render(queryLanguage?: QueryLanguage): any
Parameters
- queryLanguage QueryLanguage 
Returns
- any
Renders the ItemReader configuration as JSON object.
validateItemReader()  
public validateItemReader(): string[]
Returns
- string[]
Validate that ItemReader contains exactly either.
See also: bucketNamePath
