{"record":{"id":"36bed67bc4973d22","repo":"apache/dolphinscheduler","slug":"sagemaker-task-submit-error","errorCode":null,"errorMessage":"SageMaker task submit error","messagePattern":"SageMaker task submit error","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/task/sagemaker/SagemakerTask.java","lineNumber":123,"sourceCode":"        log.info(\"Initialize Sagemaker task params {}\", JSONUtils.toPrettyJsonString(parameters));\n\n        client = createClient();\n        utils = new PipelineUtils();\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n        try {\n            StartPipelineExecutionRequest request = createStartPipelineRequest();\n\n            // Start pipeline\n            pipelineId = utils.startPipelineExecution(client, request);\n\n            // set AppId\n            setAppIds(JSONUtils.toJsonString(pipelineId));\n        } catch (Exception e) {\n            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);\n            throw new TaskException(\"SageMaker task submit error\", e);\n        }\n    }\n\n    @Override\n    public void cancelApplication() {\n        initPipelineId();\n        try {\n            // stop pipeline\n            utils.stopPipelineExecution(client, pipelineId);\n        } catch (Exception e) {\n            throw new TaskException(\"cancel application error\", e);\n        }\n    }\n\n    @Override\n    public void trackApplicationStatus() throws TaskException {\n        initPipelineId();\n        // Keep checking the health status","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/task/sagemaker/SagemakerTask.java#L105-L141","documentation":"SagemakerTask.submitApplication() wraps the whole AWS SageMaker startPipelineExecution call in a try/catch and rethrows any failure as TaskException(\"SageMaker task submit error\", e). It means the pipeline could not be started on AWS (client/auth/API issue) — the original cause is always attached.","triggerScenarios":"utils.startPipelineExecution(client, request) throws: bad AWS credentials/region, invalid StartPipelineExecutionRequest, pipeline name not found, throttling, or network failure; the catch sets exit code failure and rethrows.","commonSituations":"Wrong AWS access key/secret or missing permission sagemaker:StartPipelineExecution, incorrect region configured on the datasource, typo in PipelineName in the request JSON, or SDK version mismatch producing unparseable responses.","solutions":["Read the chained cause 'e' in the log — it carries the real AWS SDK error (AuthFailure, ValidationException, throttling).","Verify the AWS credentials and region on the SageMaker datasource in DolphinScheduler.","Ensure the IAM identity has sagemaker:StartPipelineExecution permission for the pipeline.","Test the StartPipelineExecutionRequest JSON against the AWS CLI to confirm the pipeline name and parameters are valid.","If throttled, retry after backoff or raise the AWS service quota."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-flight: verify credentials/region before submit\nawsConfig.validate(); // access key, secret key, region all non-empty","typeGuard":null,"tryCatchPattern":"try {\n    task.submitApplication();\n} catch (TaskException e) {\n    log.error(\"SageMaker submit failed: {}\", e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e);\n    // inspect cause: auth vs validation vs throttling\n}","preventionTips":["Verify AWS credentials and region on the SageMaker datasource before scheduling","Grant sagemaker:StartPipelineExecution to the IAM identity","Test the pipeline start manually via AWS CLI first"],"tags":["sagemaker","aws","submit"],"backgroundTag":"api-request-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}