This is a sample project to demonstrate how to use AWS Step Functions to orchestrate parallel processing with AWS Lambda. It takes advantage of the new Map State feature of Step Functions to process multiple items in parallel and store the results in DynamoDB table.
- Configure max items per batch in 25 in order to avoid throttling errors in DynamoDB and use the maximum throughput of the table.
- The max concurrency of the Map State is 200 in order to avoid throttling errors in Lambda.
- Go to
bin/parallel-processing.tsfile and set up your own configuration. - Run
cdk deployto deploy the stack. - Upload the
assets/sample.csvfile to the S3 bucket created by the stack. - Go to the Step Functions console and start a new execution. Provide the name of the S3 bucket and the name of the file uploaded in the previous step following the next structure:
{
"bucket": "bucket-name",
"key": "file-name"
}
- Check the DynamoDB table to see the results.
