fix(stepfunctions-tasks): scope SubmitBatchJob IAM permissions to specific job definition#37248
Open
fix(stepfunctions-tasks): scope SubmitBatchJob IAM permissions to specific job definition#37248
Conversation
…cific job definition
Previously, BatchSubmitJob granted batch:SubmitJob with a wildcard resource
(job-definition/*), allowing submission to any job definition in the account.
This change scopes the permission to the specific job definition using the
arn:...:job-definition/{name}:* pattern, following the principle of least
privilege. When jobDefinitionArn or jobQueueArn is a JSONPath/JSONata
expression, the policy falls back to * as before.
Closes aws#37214
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aws-cdk-automation
previously requested changes
Mar 14, 2026
…test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
BatchSubmitJobcurrently grantsbatch:SubmitJobon*(all resources) when static ARNs are provided. This PR scopes the permission to the specific job queue ARN and a wildcard over all revisions of the job definition (e.g.,arn:aws:batch:...:job-definition/MyDef:*), following least-privilege best practices.When either ARN is a dynamic value (JSONPath / JSONata expression), the existing wildcard behavior is preserved as the ARN cannot be resolved at synthesis time.
Closes
Closes #37214
Testing
:*revision wildcard + job queue ARN*Breaking Changes
None. Previously the policy used
*; this change only restricts the scope, which is a security improvement and not a behavioral breaking change for CDK users.