If I understood your question correctly, let's try to apply a payload template:
{
"QueryLanguage": "JSONata", // Set explicitly; could be set and inherited from top-level
"Type": "Task",
"Resource": "arn:aws:states:::aws-sdk:s3:uploadPart",
"Parameters": {
"Bucket": "my-bucket",
"Key.$": "$.key", // from your item/input
"UploadId.$": "$.uploadId",
"PartNumber": "{% $states.context.Map.Item.Index + 1 %}", // JSONata
"Body.$": "$.chunk" // your transformed chunk
}
}
Pay attention:
+ 1 in the payload template is required as Index is 0-based, but S3 requires 1-based indexing.
If you need more tips, look here: