aws-cdk-lib.aws_stepfunctions_tasks.OutputDataConfig

interface OutputDataConfig

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.Tasks.OutputDataConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#OutputDataConfig
Javasoftware.amazon.awscdk.services.stepfunctions.tasks.OutputDataConfig
Pythonaws_cdk.aws_stepfunctions_tasks.OutputDataConfig
TypeScript (source)aws-cdk-lib » aws_stepfunctions_tasks » OutputDataConfig

Configures the S3 bucket where SageMaker will save the result of model training.

Example

new tasks.SageMakerCreateTrainingJob(this, 'TrainSagemaker', {
  trainingJobName: sfn.JsonPath.stringAt('$.JobName'),
  algorithmSpecification: {
    algorithmName: 'BlazingText',
    trainingInputMode: tasks.InputMode.FILE,
  },
  inputDataConfig: [{
    channelName: 'train',
    dataSource: {
      s3DataSource: {
        s3DataType: tasks.S3DataType.S3_PREFIX,
        s3Location: tasks.S3Location.fromJsonExpression('$.S3Bucket'),
      },
    },
  }],
  outputDataConfig: {
    s3OutputLocation: tasks.S3Location.fromBucket(s3.Bucket.fromBucketName(this, 'Bucket', 'mybucket'), 'myoutputpath'),
  },
  resourceConfig: {
    instanceCount: 1,
    instanceType: new ec2.InstanceType(sfn.JsonPath.stringAt('$.InstanceType')),
    volumeSize: Size.gibibytes(50),
  }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
  stoppingCondition: {
    maxRuntime: Duration.hours(2),
  }, // optional: default is 1 hour
});

Properties

NameTypeDescription
s3OutputLocationS3LocationIdentifies the S3 path where you want Amazon SageMaker to store the model artifacts.
encryptionKey?IKeyOptional KMS encryption key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

s3OutputLocation

Type: S3Location

Identifies the S3 path where you want Amazon SageMaker to store the model artifacts.


encryptionKey?

Type: IKey (optional, default: Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account)

Optional KMS encryption key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.