Skip to content

Commit

Permalink
fix(aws-stepfunctions-tasks): SageMaker create training job has incor…
Browse files Browse the repository at this point in the history
…rect property name for AttributeNames (#10026)

Rename mistyped property `AtttributeNames` to `AttributeNames`

Fixes #10014

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mirgj committed Aug 28, 2020
1 parent 6114045 commit ba51ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class SageMakerCreateTrainingJob extends sfn.TaskStateBase implements iam
...(channel.dataSource.s3DataSource.s3DataDistributionType
? { S3DataDistributionType: channel.dataSource.s3DataSource.s3DataDistributionType }
: {}),
...(channel.dataSource.s3DataSource.attributeNames ? { AtttributeNames: channel.dataSource.s3DataSource.attributeNames } : {}),
...(channel.dataSource.s3DataSource.attributeNames ? { AttributeNames: channel.dataSource.s3DataSource.attributeNames } : {}),
},
},
...(channel.compressionType ? { CompressionType: channel.compressionType } : {}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ test('create complex training job', () => {
recordWrapperType: tasks.RecordWrapperType.RECORD_IO,
dataSource: {
s3DataSource: {
attributeNames: ['source-ref', 'class'],
s3DataType: tasks.S3DataType.S3_PREFIX,
s3Location: tasks.S3Location.fromBucket(s3.Bucket.fromBucketName(stack, 'InputBucketA', 'mybucket'), 'mytrainpath'),
},
Expand All @@ -165,6 +166,7 @@ test('create complex training job', () => {
recordWrapperType: tasks.RecordWrapperType.RECORD_IO,
dataSource: {
s3DataSource: {
attributeNames: ['source-ref', 'class'],
s3DataType: tasks.S3DataType.S3_PREFIX,
s3Location: tasks.S3Location.fromBucket(s3.Bucket.fromBucketName(stack, 'InputBucketB', 'mybucket'), 'mytestpath'),
},
Expand Down Expand Up @@ -230,6 +232,7 @@ test('create complex training job', () => {
ContentType: 'image/jpeg',
DataSource: {
S3DataSource: {
AttributeNames: ['source-ref', 'class'],
S3DataType: 'S3Prefix',
S3Uri: {
'Fn::Join': ['', ['https://s3.', { Ref: 'AWS::Region' }, '.', { Ref: 'AWS::URLSuffix' }, '/mybucket/mytrainpath']],
Expand All @@ -244,6 +247,7 @@ test('create complex training job', () => {
ContentType: 'image/jpeg',
DataSource: {
S3DataSource: {
AttributeNames: ['source-ref', 'class'],
S3DataType: 'S3Prefix',
S3Uri: {
'Fn::Join': ['', ['https://s3.', { Ref: 'AWS::Region' }, '.', { Ref: 'AWS::URLSuffix' }, '/mybucket/mytestpath']],
Expand Down

0 comments on commit ba51ea3

Please sign in to comment.