What are the cloundformation-template-* files?

Inside the .serverless path there are a pair of files that are created by the Serverless framework. What are these files for? Can I safely delete them? Do I need to move them between machines that deploy?

  • .serverless/cloudformation-template-create-stack.json
  • .serverless/cloudformation-template-update-stack.json

My ultimate goal with the knowledge is to use it when creating my circle.yml file for CircleCI deployment.

These are the generated infracode files use to deploy your service i.e. your function and provider settings + any custom resources defined.

You can totally delete them, and you don’t need to keep track of them - they will be regenerated when you run commands (e.g. servleress deploy, package, etc).

You might want to keep track of them as build artefacts so that you know exactly what was deployed at the time.