Skip to content

aws-stepfunctions-tasks: Provide task definition as JSONata/JSONPath in .sync EcsRunTask #35307

@Michae1CC

Description

@Michae1CC

Describe the feature

The ability to provide the task definition ARN as a JSONata/JSONPath in aws_stepfunctions_tasks.EcsRunTask with the .sync integration pattern.

Use Case

Our team has a requirement to run a ECS RunTask sfn task with the .sync integration pattern by using an ECS task definition generated by a subsequent ECS RegisterTaskDefinition sfn task. The most practical way to reference the newly created task definition ARN in the RunTask sfn task is via a JSONata/JSONPath expression. Currently the aws_stepfunctions_tasks.EcsRunTask only accepts a aws_ecs.TaskDefinition. The aws_stepfunctions_tasks.CallAwsService cannot be used a work around since it does not allow the integrationPattern to be set to aws_stepfunctions.IntegrationPattern.RUN_JOB.

Proposed Solution

This feature may be introduced as a new string attribute within aws_stepfunctions_tasks.EcsRunTaskProps, taskDefinitionArn, where either the task definition ARN or a JSONata/JSONPath which evaluates to the task definition ARN may be provided. CDK users must then provide either a taskDefinition or taskDefinitionArn but not both.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS CDK Library version (aws-cdk-lib)

2.212.0

AWS CDK CLI version

2.1025.0

Environment details (OS name and version, etc.)

macOs Sonoma Version 14.6.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions