0

In these documentation from the serverless website - How to manage your AWS Step Functions with Serverless and GiTHUb - serverless-step-functions, we can find this word hellostepfunc1: in the serverless.yml file. I could not find reference to it. I dont understand what is it, and I can't find any reference to it, even after the State Machine was created into AWS.

If I delete it I get the follow error

Cannot use 'in' operator to search for 'role' in myStateMachine

But if I change its name for someName for example I have no error and the State Machine will works good.

I could assume it is only an identifier but I not sure. Where can I find reference to it?

IgorAlves
  • 5,086
  • 10
  • 52
  • 83

1 Answers1

0

This is quite specific to the library you are using and how it names the statemachine which is getting created based upon whether the name: field is provided under the hellostepfunc1: or not.

Have a look at the testcases here and here to understand better.

In-short a .yaml like

stateMachines:
    hellostepfunc1:
        definition:
            Comment: 'comment 1'
            .....

has name of statemachine like hellostepfunc1StepFunctionsStateMachine as no name was specified.

Whereas for a .yaml like

stateMachines:
    hellostepfunc1:
        name: 'alpha'
        definition:
            Comment: 'comment 1'
            .....

the name of statemachine is alpha as you had name was specified.

mascot6699
  • 272
  • 3
  • 12
  • Ok, If I got it is only a substitute, in case name: is not there. But I can change for any name. I mean it could be `hellostepfunc1:` or `hellostepfunc2:` or `anynameiwant3:`. Is it correct? – IgorAlves Aug 07 '18 at 13:24