Trying to implement the same functionality: run state machine with two parallel steps. See the following example: GitHub - aws-samples/lambda-refarch-imagerecognition: The Image Recognition and Processing Backend reference architecture demonstrates how to use AWS Step Functions to orchestrate a serverless processing workflow using AWS Lambda, Amazon S3, Amazon DynamoDB and Amazon Rekognition.
I came up with following code, but the steps Recognition and Thumbnails shoul be running in parallel:
stepFunctions:
stateMachines:
ImageProcStateMachine:
name: ImageProcStateMachine
role:
Fn::GetAtt: ["StateMachineRole", "Arn"]
definition:
Comment: "Image Processing State Machine of the Amazon States Language using an AWS Lambda Function"
StartAt: ExtractImageMetadata
States:
ExtractImageMetadata:
Type: Task
Resource:
Fn::GetAtt: [ExtractImageMetadataFunction, Arn]
Next: TransformMetadata
TransformMetadata:
Type: Task
Resource:
Fn::GetAtt: [TransformMetadataFunction, Arn]
Next: StoreImageMetadata
StoreImageMetadata:
Type: Task
Resource:
Fn::GetAtt: [StoreImageMetadataFunction, Arn]
Next: Rekognition
Rekognition:
Type: Task
Resource:
Fn::GetAtt: [RekognitionFunction, Arn]
Next: GenerateThumbnail
GenerateThumbnail:
Type: Task
Resource:
Fn::GetAtt: [GenerateThumbnailFunction, Arn]
End: true
Is there the way to implement parallel processing tasks feature with Serverless Framework?