Skip to content
v2.274.0

S3DataSource Struct ​

S3 location of the channel data.

Example ​

ts
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', 'amzn-s3-demo-bucket'), '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 ​

attributeNamesoptionalstring[]attribute_namesoptionaltyping.List[str]attributeNamesoptionalList<String>AttributeNamesoptionalstring[]AttributeNamesoptional*[]*string#
List of one or more attribute names to use that are found in a specified augmented manifest file.

Default: No attribute names

s3DataDistributionTypeoptionalS3DataDistributionTypes3_data_distribution_typeoptionalS3DataDistributionTypes3DataDistributionTypeoptionalS3DataDistributionTypeS3DataDistributionTypeoptionalS3DataDistributionTypeS3DataDistributionTypeoptionalS3DataDistributionType= None#
S3 Data Distribution Type.
s3DataTypeoptionalS3DataTypes3_data_typeoptionalS3DataTypes3DataTypeoptionalS3DataTypeS3DataTypeoptionalS3DataTypeS3DataTypeoptionalS3DataType= S3_PREFIX#
S3 Data Type.
s3LocationS3Locations3_locationS3Locations3LocationS3LocationS3LocationS3LocationS3LocationS3Locationrequired#
S3 Uri.