Morning all, I’m attempting to separate out my stack into two versions, a “staging” and a “production” version. I’m running into a problem with the fact that I have a step function declared in my serverless.yml file, and although serverless generates different functions based on the stage, ie -${opt:stage}, my deployment fails due to a reference to Step function, like such:
resources:
Outputs:
MyStepFn:
Description: The ARN of the state machine
Value:
Ref: MyStepFn
stepFunctions:
stateMachines:
myNewStepFunction:
name: 'MyStepFn-${opt:stage}'
definition:
Comment: 'Using Amazon State Language to generate a state machine for processing images'
StartAt: InitialState
It basically won’t let me deploy a different stage because it says the step function already exists, how do I get it to create a second step function based on the ${opt:stage}
How do I go about achieving this? Ie. how to I configure the serverless.yml file to generate two separate step functions?