Skip to content

fix(stepfunctions): allow JSONata expressions for Map maxConcurrency#36462

Merged
mergify[bot] merged 16 commits intoaws:mainfrom
mu7889yoon:map-maxconcurrency-jsonata
Jan 12, 2026
Merged

fix(stepfunctions): allow JSONata expressions for Map maxConcurrency#36462
mergify[bot] merged 16 commits intoaws:mainfrom
mu7889yoon:map-maxconcurrency-jsonata

Conversation

@mu7889yoon
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread packages/aws-cdk-lib/aws-stepfunctions/lib/states/map-base.ts Outdated
Copy link
Copy Markdown
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.

Comment thread packages/aws-cdk-lib/aws-stepfunctions/lib/states/map-base.ts Outdated
Co-authored-by: Kazuho Cryer-Shinozuka <malaysia.cryer@gmail.com>
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Thanks!

Thank you for your review !!

Copy link
Copy Markdown
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.

Could you please merge the latest main branch? This resolves some kind of CI problems. It is better to merge it once a week or more.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 21, 2025

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results48 ran48 passed
TestResult
No test annotations available

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 21, 2025
@gasolima gasolima added the pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. label Jan 9, 2026
@gasolima gasolima temporarily deployed to deployment-integ-test January 9, 2026 15:29 — with GitHub Actions Inactive
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 9, 2026
@mu7889yoon mu7889yoon temporarily deployed to deployment-integ-test January 10, 2026 08:15 — with GitHub Actions Inactive
@gasolima gasolima self-requested a review January 12, 2026 12:49
@gasolima gasolima removed the pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. label Jan 12, 2026
@gasolima gasolima removed the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Jan 12, 2026
@leonmk-aws
Copy link
Copy Markdown
Contributor

@Mergifyio refresh

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Jan 12, 2026

refresh

✅ Pull request refreshed

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Jan 12, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Jan 12, 2026

Merge Queue Status

✅ The pull request has been merged at 505f842

This pull request spent 7 hours 22 minutes 7 seconds in the queue, including 3 hours 19 minutes 54 seconds running CI.
The checks were run in-place.

Required conditions to merge

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Jan 12, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify Bot merged commit 2230c87 into aws:main Jan 12, 2026
22 of 23 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

6 participants