title: How to break existing CloudFormation stack into separate nested stacks, moving existing resources under nested stack
body: <p><strong>Problem:</strong></p>
  
  <p>Recently we encountered a problem with respect to maximum number of resources that you can declare in a single CloudFormation template.
  A template can support a maximum of 200 resources and we are very close to reach that limit.</p>
  
  <p>To specify more resources, we need to separate our template into multiple templates by using <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html" rel="noreferrer">Nested Stacks</a>,
  We are evaluating a best approach to breakdown the template.</p>
  
  <p><strong>Our approach:</strong></p>
  
  <p>We have created a nested stack from our main stack and removed some of the resources from main stack and added them into new nested stack.</p>
  
  <p><strong>Error:</strong></p>
  
  <p>We encountered an error in nested stack e.g. </p>
  
  <blockquote>
    <p>Resource already exists in Root stack</p>
  </blockquote>
  
  <p><strong>1.</strong> Is it possible to break our main template into nested stacks with existing resources? i.e move our existing resources under nested stack?
  or we just need to add new resources into nested stack and keep our main stack as it is with existing resources ?</p>
  
  <p><strong>2.</strong> We already reached 200 resource limit so it's difficult to add more nested stacks as well.</p>
  
  <p><strong>Resources in template,</strong></p>
  
  <p>We roughly have 100 CloudWatch alarms, DynamoDB tables, Lambda's, ES, KMS, S3 and other resources, we wan't to separate them into nested stacks specific to resource types.</p>