# Migrating CloudFormation Stacks from 0.5.x to 1.x

**URL:** <https://forum.serverless.com/t/migrating-cloudformation-stacks-from-0-5-x-to-1-x/1305>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [February 11, 2017, 10:12pm UTC](https://forum.serverless.com/t/migrating-cloudformation-stacks-from-0-5-x-to-1-x/1305 "2017-02-11T22:12:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietbrauer](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/pietbrauer/32/255_2.png) [@pietbrauer](https://forum.serverless.com/u/pietbrauer)\
**Post date:** [February 11, 2017, 10:12pm UTC](https://forum.serverless.com/t/migrating-cloudformation-stacks-from-0-5-x-to-1-x/1305/1 "2017-02-11T22:12:42Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![matt-filion](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/matt-filion/32/427_2.png) [@matt-filion](https://forum.serverless.com/u/matt-filion)\
**Post date:** [February 17, 2017, 4:53pm UTC](https://forum.serverless.com/t/migrating-cloudformation-stacks-from-0-5-x-to-1-x/1305/2 "2017-02-17T16:53:52Z")

</div>

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.

- Deploy to a new ‘stage’ and copy all the data over.
- Write a plugin to address your use case [https://serverless.com/blog/writing-serverless-plugins-2/](https://serverless.com/blog/writing-serverless-plugins-2/)

---

<div class="post-metadata">

**Author:** ![pietbrauer](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/pietbrauer/32/255_2.png) [@pietbrauer](https://forum.serverless.com/u/pietbrauer)\
**Post date:** [February 22, 2017, 1:53pm UTC](https://forum.serverless.com/t/migrating-cloudformation-stacks-from-0-5-x-to-1-x/1305/3 "2017-02-22T13:53:52Z")

</div>

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).
