Migrating CloudFormation Stacks from 0.5.x to 1.x

Hey,

I am just migrating my project from Serverless 0.5.5 to 1.6.1. Everything is going well so far, but when I want to deploy my backend it wants to create a new CloudFormation stack with all my existing tables etc. and errors:

$ sls deploy -s dev -r eu-central-1
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.....
Serverless: Stack create finished...
Serverless: Packaging service...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading service .zip file to S3 (13.72 MB)...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
...........................Serverless: Deployment failed!
 
  Serverless Error ---------------------------------------

     An error occurred while provisioning your stack: propertiesTable
     - velkomio-properties-dev already exists in <ARN>
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
 
  Your Environment Information -----------------------------
     OS:                 darwin
     Node Version:       4.7.3
     Serverless Version: 1.6.1

Of course this makes sense as I have an existing CF stack from Serverless 0.5.5 called velkomio-dev-r and the new stack (velkomio-dev) wants to create the same resources as the old one. The easiest way would be to give the existing ARN or Stack ID to my serverless.yml but AFAIK this is not possible.

Then I went ahead and wanted to deploy my function:

sls deploy function -f data -s dev -r eu-central-1
Serverless: Deploying function: data...
Serverless: Packaging function: data...
 
  Serverless Error ---------------------------------------
 
     The function "data" you want to update is not yet deployed.
     Please run "serverless deploy" to deploy your service.
     After that you can redeploy your services functions
     with the "serverless deploy function" command.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
 
  Your Environment Information -----------------------------
     OS:                 darwin
     Node Version:       4.7.3
     Serverless Version: 1.6.1

Which gives me the error because it is missing something (probably the correctly named CF stack).

Did anyone solve this issue so far? I feel like I am stuck in a loop.

As of now, you don’t have a lot of good choices. I don’t know what the official strategy is for serverless but it seems like they are slowly adding in the ability to hook in existing resources to the deploy, but for many things it doesn’t exist yet. As I see it I only see a the following options.

Thanks for the suggestions Matt.

“My use case” in this case would be everyone who ever deployed a CF stack using Serverless <1.0 and now wants to deploy the same stack with 1.0, right?

I will research on how to move DynamoDB items from one DB to the other and the same with S3 (which should be easy).