Comments (9)
Do you have a lot of separate functions/endpoints? An alternative is to combine them together, and just have one, or maybe a few.
functions:
api:
handler: api.js
events:
- http ANY /
- http ANY /{any+}
or per some kind of logical thing
functions:
fooApi:
handler: api.js
events:
- http ANY /foo
- http ANY /foo/{any+}
barApi:
handler: api.js
events:
- http ANY /bar
- http ANY /bar/{any+}
But not "getFoo", "putFoo", "postFoo", etc.
You can see my module https://github.com/dougmoscrop/serverless-http which will let you use routing like Koa/Express to make the function handler code dead simple
from serverless-plugin-split-stacks.
Yeah, this is another CloudFormation limit that this plugin does not have logic for trying to solve. It's basically a case of having to further divide in to even more nested stacks because of output/input limit, not just resource count. I can imagine how we might accomplish it, just not done.
from serverless-plugin-split-stacks.
oops i was really hoping to have a solution... Is there any other alternatives left or should i architect my endpoints in a way that it doesn't affect resource count or size limit ?
from serverless-plugin-split-stacks.
The problem is it is a existing application, so i cannot change as your suggestion now. Also all the request validations are handled in API Gateway request validator. I have also requested for limit increase with AWS support. Let me see how it goes
from serverless-plugin-split-stacks.
Even combining events does not work :(
Any update on this?
from serverless-plugin-split-stacks.
The easiest way for me to help is if you can share with me the actual CF templates so I don't have to guess about what is being exposed and make a focused suggestion/fix. Obviously you should anonymize/sanitize anything in your examples.
from serverless-plugin-split-stacks.
Now it's working, but I think that combine resource is just a patch. If you have a lot of endpoints the problem will appear again :/
from serverless-plugin-split-stacks.
You're right, unfortunately this plugin will not by you an endless ramp, you still have to try to split up concerns in to separate services.
One way to help 'move the cliff', so to speak, would be to modify the sub-stack splitting logic located here to do something like:
if (Object.keys(stack.Resources).length < 200 && Object.keys(stack.Outputs).length < 60) {
}
this would move some API resources to a new stack (APINestedStack2) but I am not sure if there would be other issues there. It's a game of cat and mouse.
from serverless-plugin-split-stacks.
Sorry, this is a duplicate of #15
I will move my comment to there.
from serverless-plugin-split-stacks.
Related Issues (20)
- Unresolved resource dependencies [ApiGatewayRestApi]
- Stack with id <stack name> does not exist
- Support for serverless v2 HOT 4
- Cross-stack dependencies?
- Serverless Framework v3: new design & how to integrate HOT 1
- An error occurred: LogGroupNestedStack - Embedded stack arn:awsxxxxxxx was not successfully updated
- Only the first function in my serverless.yml is placed in a nested stack with the VPC defined as a parameter HOT 1
- Appsync and split strategy HOT 2
- error: Template error: RootResourceId attribute of API Gateway RestAPI xxxx doesn't exist. HOT 2
- Circular dependency with perGroupFunction and resourceConcurrency HOT 2
- Pre-deployment check on circular dependencies possible? HOT 2
- Readme instructions HOT 2
- Does this plugin supports serverless v3 and node v16? HOT 1
- Using snapStart option from Serverless 3.26.0 causes circular dependency error
- Notification options for nested stack
- Support Serverless's `--minify-template` flag HOT 1
- serverless-split-stack plugin with provisionalConcurrency confguration making deployment failure HOT 1
- serverless-plugin-split-stacks wont execute HOT 4
- Circular dependency between resources: potential issue with `resourceConcurrency` and `stackConcurrency`
- Formidable arbitrary file upload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-plugin-split-stacks.