Not compatible with serverless-plugin-split-stacks
See original GitHub issuePlugin 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:
- Created 5 years ago
- Reactions:4
- Comments:7
In our case is:
serverless-plugin-split-stacks@1.5.5
serverless-domain-manager@2.6.0
sls create_domain
sls deploy
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.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)