Invoking a Glue Workflow from Step Functions got the following error when deploying Cloudformation:
Resource handler returned message: "Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: The resource provided arn:aws:states:::glue:startWorkflowRun is not recognized.
The value is not a valid resource ARN, or the resource is not available in this region.
at /States/StartGlueWorkflow/Resource' (Service: AWSStepFunctions; Status Code: 400; Error Code: InvalidDefinition;..., HandlerErrorCode: InvalidRequest)
State machine task for starting Glue Workflow.
"StartGlueWorkflow": {
"Type": "Task",
"Resource": "arn:aws:states:::glue:startWorkflowRun",
"Parameters": {
"Name": "glue-test"
},
"End": true
},
Glue workflow ("glue-test") exists in the same region, and has a trigger on-demand.
Role for Step Functions state machine with Glue Workflow policies:
RoleStmaMain:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: !Sub 'states.${AWS::Region}.amazonaws.com'
Action: 'sts:AssumeRole'
Policies:
- PolicyName: role-stma-policy
PolicyDocument:
Statement:
...
...
- Effect: Allow
Action:
- "glue:StartWorkflowRun"
- "glue:GetWorkflowRun"
- "glue:GetWorkflow"
- "glue:BatchGetJobs"
- "glue:BatchGetCrawlers"
Resource:
- "*"
Notes: - Step Functions: Standard - Region: eu-central-1
Can someone shine a light? Is the ARN correct (arn:aws:states:::glue:startWorkflowRun)?
Does Step Functions allow invocation of Glue Workflows? Most examples show Step Functions integration with a Glue Job and not a Glue Workflow.
Awesome! I confirm it works by adding the aws-sdk, very good, thanks!