DistributedMapProps Struct
Properties for configuring a Distribute Map state.
Example
/**
* JSON state input:
* {
* "bucketName": "my-bucket",
* "prefix": "item"
* }
*/
const distributedMap = new sfn.DistributedMap(this, 'DistributedMap', {
itemReader: new sfn.S3ObjectsItemReader({
bucketNamePath: sfn.JsonPath.stringAt('$.bucketName'),
prefix: sfn.JsonPath.stringAt('$.prefix'),
}),
});
distributedMap.itemProcessor(new sfn.Pass(this, 'Pass'));
Properties
assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{}#Default: Not assign variables
Using workflow variables, you can store data in a step and retrieve that data in future steps.
commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string#Default: No comment
inputPathoptionalstringinput_pathoptionalstrinputPathoptionalStringInputPathoptionalstringInputPathoptional*string= $#May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
itemBatcheroptionalItemBatcheritem_batcheroptionalItemBatcheritemBatcheroptionalItemBatcherItemBatcheroptionalItemBatcherItemBatcheroptionalItemBatcher#Default: No itemBatcher
itemReaderoptionalIItemReaderitem_readeroptionalIItemReaderitemReaderoptionalIItemReaderItemReaderoptionalIItemReaderItemReaderoptionalIItemReader#Default: No itemReader
Configuration for where to read items dataset in S3 to iterate
itemsoptionalProvideItemsitemsoptionalProvideItemsitemsoptionalProvideItemsItemsoptionalProvideItemsItemsoptionalProvideItems#Default: The state input as is.
itemSelectoroptional{ [key: string]: any }item_selectoroptionaltyping.Mapping[str, Any]itemSelectoroptionalMap<String, Object>ItemSelectoroptionalIDictionary<string, object>ItemSelectoroptional*map[string]interface{}= $#itemsPathoptionalstringitems_pathoptionalstritemsPathoptionalStringItemsPathoptionalstringItemsPathoptional*string= $#jsonataItemSelectoroptionalstringjsonata_item_selectoroptionalstrjsonataItemSelectoroptionalStringJsonataItemSelectoroptionalstringJsonataItemSelectoroptional*string= $#Example value: {% {\"foo\": \"foo\", \"input\": $states.input} %}
jsonataMaxConcurrencyoptionalstringjsonata_max_concurrencyoptionalstrjsonataMaxConcurrencyoptionalStringJsonataMaxConcurrencyoptionalstringJsonataMaxConcurrencyoptional*string#Default: full concurrency
A JSONata expression that evaluates to an integer, specifying the maximum concurrency dynamically. Mutually exclusive with maxConcurrency and maxConcurrencyPath.
Example value: {% $states.input.maxConcurrency %}
Default: No label
Unique name for the Distributed Map state added to each Map Run
mapExecutionTypeoptionalStateMachineTypemap_execution_typeoptionalStateMachineTypemapExecutionTypeoptionalStateMachineTypeMapExecutionTypeoptionalStateMachineTypeMapExecutionTypeoptionalStateMachineType= StateMachineType.STANDARD#The execution type of the distributed map state
This property overwrites ProcessorConfig.executionType
maxConcurrencyoptionalnumbermax_concurrencyoptionalint | floatmaxConcurrencyoptionalNumberMaxConcurrencyoptionaldoubleMaxConcurrencyoptional*float64#Default: full concurrency
An upper bound on the number of iterations you want running at once.
maxConcurrencyPathoptionalstringmax_concurrency_pathoptionalstrmaxConcurrencyPathoptionalStringMaxConcurrencyPathoptionalstringMaxConcurrencyPathoptional*string#Default: full concurrency
A JsonPath that specifies the maximum concurrency dynamically from the state input.
outputPathoptionalstringoutput_pathoptionalstroutputPathoptionalStringOutputPathoptionalstringOutputPathoptional*string= $#May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{}#Default: $states.result or $states.errorOutput
notes
When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.
queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage= JSONPath#If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.
resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string= $#May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
resultSelectoroptional{ [key: string]: any }result_selectoroptionaltyping.Mapping[str, Any]resultSelectoroptionalMap<String, Object>ResultSelectoroptionalIDictionary<string, object>ResultSelectoroptional*map[string]interface{}= None#You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
resultWriteroptionalResultWriterresult_writeroptionalResultWriterresultWriteroptionalResultWriterResultWriteroptionalResultWriterResultWriteroptionalResultWriterdeprecated#Default: No resultWriter
resultWriterV2optionalResultWriterV2result_writer_v2optionalResultWriterV2resultWriterV2optionalResultWriterV2ResultWriterV2optionalResultWriterV2ResultWriterV2optionalResultWriterV2#Default: No resultWriterV2
stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string#Default: The construct ID will be used as state name
toleratedFailureCountoptionalnumbertolerated_failure_countoptionalint | floattoleratedFailureCountoptionalNumberToleratedFailureCountoptionaldoubleToleratedFailureCountoptional*float64#Default: No toleratedFailureCount
Number of failed items to tolerate in a Map Run, as static number
toleratedFailureCountPathoptionalstringtolerated_failure_count_pathoptionalstrtoleratedFailureCountPathoptionalStringToleratedFailureCountPathoptionalstringToleratedFailureCountPathoptional*string#Default: No toleratedFailureCountPath
Number of failed items to tolerate in a Map Run, as JsonPath
toleratedFailurePercentageoptionalnumbertolerated_failure_percentageoptionalint | floattoleratedFailurePercentageoptionalNumberToleratedFailurePercentageoptionaldoubleToleratedFailurePercentageoptional*float64#Default: No toleratedFailurePercentage
Percentage of failed items to tolerate in a Map Run, as static number
toleratedFailurePercentagePathoptionalstringtolerated_failure_percentage_pathoptionalstrtoleratedFailurePercentagePathoptionalStringToleratedFailurePercentagePathoptionalstringToleratedFailurePercentagePathoptional*string#Default: No toleratedFailurePercentagePath
Percentage of failed items to tolerate in a Map Run, as JsonPath