How can I verify the CloudFormation changes before deployment?

Serverless just decided to drop all but one DynamoDB table, how can I check what modifications it’s planning on making before I run deploy?

As far as I can tell there’s no --dryrun on serverless deploy and I can’t find an option to output the CloudFormation json.

To prevent resources from being deleted with the rest of the stack, you should add DeletionPolicy: Retain to those resources.


It’s not spelled out in a simple changelog type format, but you can generate the CloudFormation files, using package instead of deploy.

sls package -s <stage>

That generates the files in the .serverless folder including:

  • cloudformation-template-update-stack.json
  • serverless-state.json
  • .zip

You can see the target Cloudformation state in the serverless-state.json file

Hope that helps.