aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.93k forks source link

Support DataProcessing in SagemakerTransformTask #3543

Closed rbs392 closed 2 years ago

rbs392 commented 5 years ago

https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html#SageMaker-CreateTransformJob-request-DataProcessing

rbs392 commented 5 years ago

@eladb can you please comment if this feature is planned or possible in any upcoming releases?

SomayaB commented 5 years ago

Hi @rbs392, thanks for submitting a feature request. Unfortunately until this is added to CloudFormation we can't add it to the CDK. I've submitted a ticket for them to add it. You can also ask them here.

dahnny012 commented 4 years ago

I was able to get it to work by overriding the bind method. Does this mean it is supported in CFN it now?

export class SageMakerTransformTaskWithDataProcessingInput extends tasks.SagemakerTransformTask {
         public bind(task: sfn.Task): sfn.StepFunctionsTaskConfig {
             const config = super.bind(task)

             const newParameters = config.parameters || {};

             // Adding DataProcessing seperately into the input
             // as this is not part of the SagemakerTransformTask model
             // refer https://github.com/aws/aws-cdk/issues/3543

             newParameters["DataProcessing"] = {
                 "JoinSource": "Input"
             }

             return {
                 resourceArn: config.resourceArn,
                 policyStatements: config.policyStatements,
                 parameters: newParameters
             }
         }
     }
nija-at commented 4 years ago

Seems to be missing in their documentation for CreateTransformJob - https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html

github-actions[bot] commented 2 years ago

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.