Search code examples
amazon-web-servicesserverless-frameworkserverless-offline

Serverless offline complains about missing stack before the first deployment


I am trying to run locally a serverless application, but it is throwing this error:

Stack with id <my_stack_id> does not exist

I didn't deploy the stack yet, just trying to run it locally. It is possible that the offline serverless plugin only works with an existing deployed stack?


Solution

  • You don't need to deploy your stack

    Things you need to have to use serverless offline :

    plugins:
      - serverless-offline
    

    in your serverless.yml file

    then run the command sls offline start

    then you can call your lambda functions with sls invoke local