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

Support the new "Parameters" option of AWS Step Functions #1480

Closed
guisrx opened this issue Jan 4, 2019 · 6 comments · Fixed by #1492
Closed

Support the new "Parameters" option of AWS Step Functions #1480

guisrx opened this issue Jan 4, 2019 · 6 comments · Fixed by #1492
Labels
@aws-cdk/aws-stepfunctions Related to AWS StepFunctions feature-request A feature should be added or improved.

Comments

@guisrx
Copy link
Contributor

guisrx commented Jan 4, 2019

AWS Step Functions released support for Parameters option in the input definition.

CDK should be able to define this attribute:

    const initalTask = new stepfunctions.Task(this, "InitialTask", {
      resource: asyncLambda,
      parameters: {
        "task.$": "$.task"
      }
      inputPath: "$",
      outputPath: "$.state"
    }).next(nextTask);
@rix0rrr rix0rrr added feature-request A feature should be added or improved. @aws-cdk/aws-stepfunctions Related to AWS StepFunctions gap labels Jan 4, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 4, 2019

In the mean time, I hope you are aware you can use CloudFormation overrides to work around the lack of support for now.

@guisrx
Copy link
Contributor Author

guisrx commented Jan 4, 2019

I could not use the CloudFormation overrides because what I need is a property (on TaskProps) that will end up as a JSON object. I got it to work for now with this:

    interface ParameterizedTaskProps extends sf.TaskProps {
      parameters: any;
    }

    class ParameterizedTask extends sf.Task {
      private parameterizedProps: ParameterizedTaskProps;

      constructor(parentConstruct: cdk.Construct, id: string, parameterizedProps: ParameterizedTaskProps) {
        super(parentConstruct, id, parameterizedProps);
        this.parameterizedProps = parameterizedProps;
      }

      public toStateJson(): object {
        const stateJson = {
          ...super.toStateJson(),
          Parameters: this.parameterizedProps.parameters
        };
        return stateJson;
      }
    }

@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 4, 2019

You are right, of course. Sorry!

guisrx pushed a commit to guisrx/aws-cdk that referenced this issue Jan 7, 2019
AWS Step Functions released support for 'Parameters' option in the input definition.

Closes aws#1480
guisrx pushed a commit to guisrx/aws-cdk that referenced this issue Jan 8, 2019
… added a link to the docs

    AWS Step Functions released support for 'Parameters' option in the input definition.

    Closes aws#1480
rix0rrr pushed a commit that referenced this issue Jan 8, 2019
AWS Step Functions released support for 'Parameters' option in the input definition.

Closes #1480
@fabio-vitali
Copy link

commit d0c5283 has removed this... can this issue be reopened?

@davidleeshanok
Copy link

I'm unable to set Parameters on Step Functions tasks in CDK v1.3.

Can this issue be reopened?

@eiva
Copy link

eiva commented Nov 9, 2021

I see this StepFunctionsInvokeActivity still have no parameters path.
I think this need to be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions Related to AWS StepFunctions feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants