serverless-step-functions-local
serverless-step-functions-local copied to clipboard
Serverless Typescript
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
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", }
It is the way it has to be done to work.