Skip to content

Still getting Error: The CloudFormation template is invalid: Template format error: Number of resources, 536, is greater than maximum allowed, 500 #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Saswatxp opened this issue Mar 2, 2021 · 6 comments

Comments

@Saswatxp
Copy link

Saswatxp commented Mar 2, 2021

I have added the following to in serverless.yml file still i am seeing no changes am i missing anything?

custom:
splitStacks:
perFunction: false
perType: true
perGroupFunction: false

@davidjung1977
Copy link

Same Problem here - it seems the

Serverless: [serverless-plugin-split-stacks]: - (root): xxx

has a maximum of 500.

@TravisHoover
Copy link

For me, I was only able to get it to work when creating a new service. If you have an existing service, you need to sls remove it then deploy these changes.

@GrahamCampbell
Copy link

You can try commented out the resource you want to move, first, and then uncommenting them after one deploy run.

@gaboAcosta
Copy link

We are facing that issue right now, blocked from deploying and moving away from the plugin since we don't find an evident solution

@dougmoscrop
Copy link
Owner

dougmoscrop commented Aug 26, 2022

You should use a custom stacks-map to move resources around. This plugin is very cautious upfront about what resources are safe to move. But I implore you, split your services up, if your stack ever gets in to a bad state you will have a terrible time. "byType" does not move everything, it just does 'of the resources I trust I can move, arrange them by type'

You might use https://github.com/dougmoscrop/serverless-plugin-bootstrap to create an entirely separate stack for your persist resources (tables, queues, buckets)

@kendjr
Copy link

kendjr commented Mar 28, 2025

I am trying to use the serverless split stack, and it is not working. I tried to use a custom stacks map, but it still puts over 500 resources in the root. Can you explain what you mean about "split your services up"?

This is my yaml file:

splitStacks:
perFunction: true
perType: true
maxStackResources: 200
nestedStacks:
CustomResourcesStack:
resources:
- ElastiCacheSubnetGroup
- ElastiCacheCluster
- GatewayResponseDefault4XX
- SesTemplate
- CognitoUserPool
- CognitoUserPoolClient
- ApiGatewayAuthorizer
- CognitoIdentityPool
- CognitoIdentityPoolRoles
- CognitoAuthRole
- GoogleUserPoolIdentityProvider...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants