Giter VIP home page Giter VIP logo

Comments (9)

dougmoscrop avatar dougmoscrop commented on July 23, 2024 1

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.

dougmoscrop avatar dougmoscrop commented on July 23, 2024

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.

yogumanivannan avatar yogumanivannan commented on July 23, 2024

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.

yogumanivannan avatar yogumanivannan commented on July 23, 2024

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.

brunocascio avatar brunocascio commented on July 23, 2024

Even combining events does not work :(

Any update on this?

from serverless-plugin-split-stacks.

dougmoscrop avatar dougmoscrop commented on July 23, 2024

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.

brunocascio avatar brunocascio commented on July 23, 2024

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.

dougmoscrop avatar dougmoscrop commented on July 23, 2024

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.

dougmoscrop avatar dougmoscrop commented on July 23, 2024

Sorry, this is a duplicate of #15

I will move my comment to there.

from serverless-plugin-split-stacks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.