State file management best practices

I have checked the documentation but I did not find how the state file (serverless-state.json) should be treated in a shared environment.

In my team every member can deploy to a playground environment from its machine; we do not know how to manage the state file because we did not find a clear explanation about it.

  • Should we share the state to avoid conflicts? (something like the Terraform state approach).
  • What happen if the state file is deleted\recreated from scratch at every deploy? We use this approach in the CI pipeline which deploys to test/prod.

Thanks a lot.

1 Like

Howdy. Iā€™d love to know the answers to these questions, too. Not only does this affect multiple humans working on their workstations, but how is Serverless to be used within a CI system to deploy, upgrade and destroy deployed resources without a shared state? Is there documentation regarding this and I just missed it? :smiley:

Thanks in advance. :slight_smile: