question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible with serverless-plugin-split-stacks

See original GitHub issue

Plugin fails during deployment:

Serverless: Packaging service...
Serverless: [serverless-plugin-split-stacks]: Summary: 103 resources migrated in to 5 nested stacks
Serverless: [serverless-plugin-split-stacks]:    Resources per stack:
Serverless: [serverless-plugin-split-stacks]:    - (root): 37
Serverless: [serverless-plugin-split-stacks]:    - APINestedStack: 27
Serverless: [serverless-plugin-split-stacks]:    - AccountsMethodsNestedStack: 8
Serverless: [serverless-plugin-split-stacks]:    - GeneralMethodsNestedStack: 21
Serverless: [serverless-plugin-split-stacks]:    - ModelsNestedStack: 33
Serverless: [serverless-plugin-split-stacks]:    - ThingsMethodsNestedStack: 14
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Validating template...

  Error --------------------------------------------------

  The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [ApiGatewayRestApi] in the Resources block of the template

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

serverless 1.26.1v serverless-domain-manager 2.3.6v

Plugins used:

  • serverless-webpack
  • serverless-offline
  • serverless-plugin-split-stacks
  • serverless-aws-documentation
  • serverless-domain-manager

Plugin is not compatible with serverless-plugin-split-stacks. The serverless-domain-manager is adding resources to the cloudformation after the packaging phase (before:deploy:deploy) which breaks the deployment since the split stack modifies the cloudformation before the packaging (after:aws:package:finalize:mergeCustomProviderResources).

I made a quick test and changed the following hook 'before:deploy:deploy': this.setUpBasePathMapping.bind(this) to 'before:package:finalize': this.setUpBasePathMapping.bind(this) and was able to deploy the stack successfully.

Created a PR with the changes https://github.com/amplify-education/serverless-domain-manager/pull/121

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

7reactions
stgogmcommented, Sep 10, 2018

In our case is:

  • Install serverless-plugin-split-stacks@1.5.5
  • Install serverless-domain-manager@2.6.0
  • Run sls create_domain
  • Wait 40 minutes…
  • Run sls deploy
  • Deploy fails because: The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [ApiGatewayRestApi] in the Resources block of the template

If we downgrade to serverless-domain-manager@2.3.5 it works.

7reactions
Rapolcommented, May 21, 2018

No updates on the issue? Im still using my PR to deploy a project with both split stack and domain manager.

@ozbillwang If I dont find any useful information with debug on, my next step is to take a look at the .serverless and inspect the cloudformations that is generating. I knew about this error because other plugins have the same problem with the split stack plugin (https://github.com/dougmoscrop/serverless-plugin-split-stacks/issues/9)

Read more comments on GitHub >

github_iconTop Results From Across the Web

serverless-plugin-split-stacks - npm
Split Serverless deployments in to nested CloudFormation stacks. Latest version: 1.12.0, last published: 2 months ago.
Read more >
Split Stacks - Serverless Framework: Plugins
This plugin migrates CloudFormation resources in to nested stacks in order to work around the 200 resource limit. There are built-in migration strategies...
Read more >
Cloudformation root stack resources are not split properly with ...
We use serverless-plugin-split-stacks to break resources into nested stacks and have set it up in serverless.yml as follows.
Read more >
serverless-plugin-split-stacks - Bountysource
Hi, I'm facing an weird error on split stacks plugin. We have about 273 resources and I'm still able to deploy without the...
Read more >
4 Plugins to Get the Best Out of the Serverless Framework
npm install --save-dev serverless-plugin-split-stacks ... Following deployment, the Serverless Framework does not purge previous versions of functions from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found