serverless-step-functions icon indicating copy to clipboard operation
serverless-step-functions copied to clipboard

Circular dependency calling intrinsic function

Open daniel12564 opened this issue 3 years ago • 1 comments

Description

I'm trying to call a defined function inside my state machine but I'm getting an circular dependecy error when trying to deploy.

The CloudFormation template is invalid: Circular dependency between resources: [ParseCSVLambdaFunction, MyStateMachineRole, MainLambdaVersionnYY56DTGKT8qpoN7ArCtDdbAn6lhU27couqRaVo4, ParseCSVLambdaVersion13szSHFSBdtef6BDbtn76mDf0R84zu0MQT2JSzfaMMo, MyStateMachine, MainLambdaFunction]

This is my serverless.yml config

functions:
  main:
    handler: handler.main  <--- This function fires the state machine
  parseCSV:
    handler: handler.parse_csv

stepFunctions:
  stateMachines:
    hellostepfunc:
      name: myStateMachine
      definition:
        StartAt: GetS3File
        States:
          GetS3File:
            Type: Task
            Resource: !Ref ParseCSVLambdaFunction
            Next: SuccessState
          SuccessState:
            Type: Succeed

Any idea how can I solve this issue?

Additional Data

  • Serverless Framework Core Version you're using: 2.60.3
  • The Plugin Version you're using: 5.4.5
  • Operating System: macOS Big Sur 11.6
  • Stack Trace:
  • Provider Error messages:

daniel12564 avatar Nov 22 '21 16:11 daniel12564

Having the same problem

SenMorgan avatar Oct 11 '23 09:10 SenMorgan