serverless-step-functions
serverless-step-functions copied to clipboard
Circular dependency calling intrinsic function
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:
Having the same problem