Open baziliolg opened 2 years ago
The peer dependency is ^2.32.0
, which means any version >= 2.32.0
and < 3.0.0
.
I haven't tested it with the most recent version of Serverless. If it does work, happy to accept a PR updating the peer dependency. :)
I've tried this plugin with serverless@3.21.0
and serverless-offline@9.1.6
, and found out that OFFLINE_STEP_FUNCTIONS_ARN_
environment variables do not appear.
As a workaround, directly defining arn:aws:states:${region}:${accountId}:stateMachine:${stateMachineName}
in lambda codes seems working.
@shinnoki I tried the solution you recommended and it starts the execution but after the first lambda function, it goes into a wait state, and then after some time it gives a timeout error. Did you face this issue also?
I'm running into the same issue. Manually setting the OFFLINE_STEP_FUNCTIONS_ARN_
env variables doesn't seem to work. I get this error:
StateMachineDoesNotExist: State Machine Does Not Exist
Also not seeing any logs from serverless-step-functions-local
on startup (as we did before upgrading serverless). It seems like maybe serverless-step-functions-local
is not starting at all.
serverless: 3.24.1
serverless-offline: 11.2.3
serverless-step-functions: 3.11.0
serverless-step-functions-local: 0.4.0
In case it helps someone find this in search, we were initially getting this error before realizing the OFFLINE_STEP_FUNCTIONS_ARN_
env variables aren't being set:
InvalidArn: Invalid Arn: ''
I ended up getting this to work. There are a few issues:
process.env.WHATEVER
). It produces this serverless configuration warning:Warning: Invalid configuration encountered at 'provider.environment': unrecognized property 'OFFLINE_STEP_FUNCTIONS_ARN_dripEmailScheduling-development'
It might be possible to tell serverless to allow those env variables. But for now manually setting them is a fine workaround.
start
when starting serverless (e.g. sls offline start ...
). Apparently that is required or the serverless-offline lifecycle events won't fire (c.f. https://www.serverless.com/plugins/serverless-offline). This is what ultimately fixed the issue.Does it invoke local lambda functions as well in steps? @cullylarson
I have tried out the PR #21 and I my state machine also gets stuck in the wait state until it times out
@cullylarson was your solution to just to use sls offline start
?
Does it invoke local lambda functions as well in steps? @cullylarson
You can invoke it with the aws cli aws stepfunctions --endpoint-url http://localhost:8083 start-execution --state-machine-arn ARN
Hi, the requirements state that this plugin requires Serverless >= v2.32.0. I have Serverless 3.21.0:
Environment: darwin, node 18.6.0, framework 3.21.0 (local), plugin 6.2.2, SDK 4.3.2
When I try to install serverless-step-functions-local package, the installation fails:
Is this by design, the plugin does not indeed support Serverless 3.x?