Skip to content

Conversation

@mu7889yoon
Copy link

@mu7889yoon mu7889yoon commented Dec 19, 2025

Issue # (if applicable)

Closes #36274

Reason for this change

In the current implementation, the Map state's maxConcurrency property only accepts numeric values.
However, according to the Amazon States Language specification, maxConcurrency can also be defined using a JSONata expression.

This limitation prevents users from dynamically controlling concurrency based on input data and causes a mismatch between CDK and the underlying Step Functions / CloudFormation capabilities.

This change updates the implementation to allow JSONata expressions for Map maxConcurrency, aligning CDK behavior with the Step Functions specification.

Description of changes

This PR updates the Map state to support JSONata expressions for the maxConcurrency property.

A new option is introduced to allow maxConcurrency to be specified as a JSONata expression, in addition to a static numeric value.
This option is mutually exclusive with the existing numeric maxConcurrency configuration.

During synthesis, when a JSONata expression is provided, it is rendered directly into the CloudFormation template as the Map state's maxConcurrency value.

An alternative approach, such as introducing a new class or restructuring the existing API, was considered.
However, this was avoided to prevent breaking changes for existing users.

Describe any new or updated permissions being added

None

Description of how you validated changes

Added unit test and an integration test

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team December 19, 2025 15:47
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Dec 19, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@badmintoncryer
Copy link
Contributor

@mu7889yoon Thank you for your contirbution. If you have any problem to execute integ test, please read this document (in Japanese!).

https://jaws-ug-cdk.github.io/cdk-conf-2024-contribute-workshop/

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Dec 19, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 19, 2025 17:25

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation removed the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Dec 19, 2025
@mu7889yoon mu7889yoon marked this pull request as draft December 19, 2025 17:39
@mu7889yoon mu7889yoon marked this pull request as ready for review December 19, 2025 17:43
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've added some minor comments.

Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've added a tiny comment. After your modification, I'll approve this PR.

Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mu7889yoon
Copy link
Author

Thanks!

Thank you for your review !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-stepfunctions): Unable to use JSONata expression for Map MaxConcurrency parameter

3 participants