I'd like to call an "activity" task from my workflow but have the activity ARN be defined by an external resource (for example, the activity ARN could come from the input, or it could come as the output of a lambda execution in other parts of the workflow.
However, the Resource property on tasks doesn't seem to accept the JsonPath substitution syntax. For example, for this task definition:
"DynamicActivity":{
"Type": "Task",
"Resource.$": "$.activityArn",
"Next":"Continue"
},
I get errors immediately from the states parser in the console:
I'm aware that having a dynamic name can be done for lambdas, since with lambdas you are allowed to split the function name from the resource ARN, something like:
"DynamicLambda": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke",
"Parameters": {
"FunctionName.$": "$.functionName"
},
"Next": "Continue"
}
Is there an equivalent syntax for specifying an activity name dynamically in Step Functions?
"Resource": "arn:aws:states:::activity:???"
"Parameters": {
"ActivityName.$": "$.activityName"
}
If not, is there any other way I could start an activity dynamically without knowing its ARN or name statically? Can activities be started from a process other than the workflow itself (i.e. can a lambda function start an activity)?
