Skip to content

Circular dependency calling intrinsic function #470

@daniel12564

Description

@daniel12564

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: state-machineState machine definition and ASL compilationbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions