Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@aws-cdk/aws-stepfunctions-tasks] SageMakerCreateTrainingJob fails on deploy The field "AtttributeNames" is not supported by Step Functions #10014

Closed
mirgj opened this issue Aug 27, 2020 · 0 comments · Fixed by #10026
Assignees
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@mirgj
Copy link
Contributor

mirgj commented Aug 27, 2020

As per title trying to deploy a step function with SageMakerCreateTrainingJob will fail due to a typo in the code. AtttributeNames should be replaced with AttributeNames

...(channel.dataSource.s3DataSource.attributeNames ? { AtttributeNames: channel.dataSource.s3DataSource.attributeNames } : {}),

Reproduction Steps

Just create a SageMakerCreateTrainingJob with a inputDataConfig field. eg

inputDataConfig: [
  {
    channelName: 'train',
    inputMode: tasks.InputMode.PIPE,
    contentType: 'application/x-recordio',
    recordWrapperType: tasks.RecordWrapperType.RECORD_IO,
    dataSource: {
      s3DataSource: {
        attributeNames: ['source-ref', 'class'],
        s3DataType: tasks.S3DataType.AUGMENTED_MANIFEST_FILE,
        s3Location: '...'
      },
    },
  },
  {
    channelName: 'validation',
    inputMode: tasks.InputMode.PIPE,
    contentType: 'application/x-recordio',
    recordWrapperType: tasks.RecordWrapperType.RECORD_IO,
    dataSource: {
      s3DataSource: {
        attributeNames: ['source-ref', 'class'],
        s3DataType: tasks.S3DataType.AUGMENTED_MANIFEST_FILE,
        s3Location: '...'
      },
    },
  },
],

What did you expect to happen?

should deploy correctly as the definition is correct

What actually happened?

deploy fails with the following error:

Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: The field "AtttributeNames" is not supported by Step Functions at /States/Sagemaker Training Job/Parameters' (Service: AWSStepFunctions; Status Code: 400; Error Code: InvalidDefinition; Proxy: null)

Environment

  • CLI Version : 1.60.0
  • Framework Version: 1.60.0
  • Node.js Version: v10.20.1
  • OS : MacOS
  • Language (Version): typescript 3.7.2

Other


This is 🐛 Bug Report

@mirgj mirgj added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 27, 2020
@mergify mergify bot closed this as completed in #10026 Aug 28, 2020
mergify bot pushed a commit that referenced this issue Aug 28, 2020
…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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
2 participants