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

Serverless Typescript

Open Wibberley opened this issue 2 years ago • 2 comments

For my current project I am using Serverless Typescript rather than .yml

When trying to run 'serverless offline start'

Getting the error :

Invalid State Machine Definition: ''SCHEMA_VALIDATION_FAILED: Expected value of type [STRING] at /States/GetUserData/Resource''

This is the value for Resource in the Severless Step Functions Local output:

"Resource":{"Fn::GetAtt":["appuserGetter","Arn"]}

This is valid syntax for using Fn::GetAtt for JSON.

Below is a snippet of the JSON.

States: { GetUserData: { Type: "Task", Resource: { "Fn::GetAtt": ["appuserGetter", "Arn"], }, End: true,},

Thanks in advance, Liam

Wibberley avatar May 23 '22 14:05 Wibberley

Having to use TaskResourceMapping to get around this for now.

Not sure if this is expected behaviour.

TaskResourceMapping: { GetUserData: "arn:aws:lambda:eu-west-1:${accountid}:function:${self:provider.stage}-app-user-get", }

Wibberley avatar May 23 '22 14:05 Wibberley

It is the way it has to be done to work.

czlowiek488 avatar May 23 '22 17:05 czlowiek488