Serverless: Question: Can I use `.serverless/cloud-formation-template-update-stack.json` to manually deploy the CF stack?

Created on 6 Feb 2019  路  1Comment  路  Source: serverless/serverless

I'm building a Serverless Plugin which integrates with an internal deployment provider in the company I work for. We wanted to do the following:

  • sls package
  • take .serverless/cloud-formation-template-update-stack.json and update the stack via our deployment provider (which has an API to do this)

This is the approach we're planning to go for, that way we don't need to worry about any permissions in the host running the serverless cli etc. because is all taken care of by the deployment provider.

The problem is we are concerned that by doing this we'll miss functionality that is only available if you run sls deploy, like some more transformations that happen to the compiled CF after packaging when you run sls deploy.
Can I trust that the cf update template artefact produced by sls package will match exactly what sls deploy deploys?

help wanted question

Most helpful comment

Hey @danielcondemarin thanks for opening 馃憤

Yes, you can definitely use the CloudFormation templates to deploy your stack. AFAIK many users use their CI / CD system to do exactly that. At the end of the day everything (done by core) complies down to CloudFormation when you're using the Framework with aws as a provider.

The only thing which can influence that is the usage of non-CloudFormation plugins. Meaning plugins that do something with your deployment which is not handled via CloudFormation and hence will put the whole application into an drifting state.

>All comments

Hey @danielcondemarin thanks for opening 馃憤

Yes, you can definitely use the CloudFormation templates to deploy your stack. AFAIK many users use their CI / CD system to do exactly that. At the end of the day everything (done by core) complies down to CloudFormation when you're using the Framework with aws as a provider.

The only thing which can influence that is the usage of non-CloudFormation plugins. Meaning plugins that do something with your deployment which is not handled via CloudFormation and hence will put the whole application into an drifting state.

Was this page helpful?
0 / 5 - 0 ratings