Skip to content
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

VPC lookup happens for every lambda in serial and takes a long time for large projects #76

Closed
tylerwalts opened this issue Mar 24, 2023 · 2 comments · Fixed by #80
Closed

Comments

@tylerwalts
Copy link

On an existing large (~75 endpoints) serverless framework project we moved it to a VPC which is managed outside of serverless.

This plugin works to get the job done, but it is much slower than before since the lookup now seems to happen in series for every function in the project.

Is there a way to get it to only lookup the VPC once, and then re-use the value for all the rest?

@jacobmaurer
Copy link

FWIW - we're seeing the same bottleneck with our project with a good number of endpoints - it takes quite a while to discover each one sequentially. Perhaps it could be updated with a configurable option to discover them in parallel instead?

@jacobmaurer
Copy link

After poking around a bit, I think all it would take is a Promise.all() wrapper around https://github.com/amplify-education/serverless-vpc-discovery/blob/main/src/index.ts#L116, but for more controlled and configured concurrency, obviously a bit more involved (could use bluebird map with concurrency or equivalent)

@rddimon rddimon linked a pull request Dec 15, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants