serverless-step-functions-local
serverless-step-functions-local copied to clipboard
Missing required key 'stateMachineArn' in params
The plugin is not adding the environment variable with the state machine ARN, when I execute the state machine locally, I get this error:
{
"errorMessage": "Missing required key 'stateMachineArn' in params",
"errorType": "String",
"stackTrace": null
}
demo: https://github.com/ymulenll/serverless-step-functions-demo
the line when the env variable is undefined
: https://github.com/ymulenll/serverless-step-functions-demo/blob/master/handler.js#L9
I am starting the project and running the function to start the state maching: GET http://localhost:3500/startSF
I haven't used this package in forever but maybe it's getting mapped to OFFLINE_STEP_FUNCTIONS_ARN_FirstState
?
Try printing process.env
and see if it's available somewhere else.
I haven't used this package in forever but maybe it's getting mapped to
OFFLINE_STEP_FUNCTIONS_ARN_FirstState
?Try printing
process.env
and see if it's available somewhere else.
In my code, in the hello
function I am returning the process.env
object and there is nothing there related to the ARN.
I think I stumbled upon this issue myself, and it has something to do with
serverless offline vs serverless offline start
I found it via a different package that mentions it within their known issues: see - https://www.npmjs.com/package/@fernthedev/serverless-offline-step-functions
I tried adding start to this package and it started adding the env vars/setting up properly
@Scott-lasertrade thanks for the tip - I'll stop trying to figure out what I am doing wrong.
serverless offline
does start successfully but doesn't create the ARN for the step function.
serverless offline start
doesn't work behind a corporate proxy. it just says "Downloading Step Functions Local..."
And then eventually it times out and doesn't start - however it works fine from outside the proxy.