Skip to content

stepfunctions: using itemProcessor with mode = DISTRIBUTED doesn't work out of the box due to permission error #28820

@akerra6993

Description

@akerra6993

Describe the bug

Deploying a map state in a state machine using distributed processing mode (and standard execution type for the child executions) causes an IAM permissions issue since the parent state machine role doesn't have permission to start executions on itself. Trying to grant permissions via stateMachine.grantStartExecution(stateMachine) causes a circular dependency.

Expected Behavior

When using distributed processing mode, necessary permissions should be generated by default.

Current Behavior

Start execution permission for the child executions is not granted to the parent state machine.

Reproduction Steps

const mapState = new Map(this, 'Map State', {
  itemsPath: JsonPath.stringAt('$...'),
  maxConcurrency: 100,
   parameters: {
    ...
   }
})
mapListings.itemProcessor(..., {
  executionType: ProcessorType.STANDARD,
  mode: ProcessorMode.DISTRIBUTED
})

Possible Solution

Automatically add the necessary IAM policy to the parent state machine's default role

Additional Information/Context

No response

CDK CLI Version

2.122.0 (build 7e77e02)

Framework Version

No response

Node.js Version

v18.16.1

OS

MacOS Sonoma 14.0 (M2 Pro)

Language

TypeScript

Language Version

No response

Other information

technically I am using vanilla JS CDK language but that's not an option in the language dropdown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-stepfunctionsRelated to AWS StepFunctionsbugThis issue is a bug.effort/mediumMedium work item – several days of effortp3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions