Closed tylerwalts closed 11 months ago
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?
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)
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?