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

Question/Proposal: Point to localstack for all sls calls ? #23

Closed
aaronstaves opened this issue May 2, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@aaronstaves
Copy link

commented May 2, 2019

I've been fighting with this for the past hour or two, but is there any reason sls-localstack is reconfiguring sls to point to localstack only for the before:deploy:resources hook ? As seen here - https://github.com/localstack/serverless-localstack/blob/master/src/index.js#L26

If we're using serverless-localstack, any reason why we wouldn't want to enable it for every request ? Something similar to this -
aaronstaves@669c71c

@nealeu

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

What good timing. I've just hit the same but just added before:invoke:invoke as I wanted to use sls invoke.

@aaronstaves

This comment has been minimized.

Copy link
Author

commented May 3, 2019

sls invoke is actually what led me to this as well, and I solved it by also adding before:invoke:invoke.
But then trying to run other commands (i.e. sls info), I was having to hunt down all the hook names and add them in.

If there isn't any issue with reconfiguring the endpoints anytime sls-localstack is used, I can certainly make a PR. I'm just wondering why before:deploy:resources was the only hook sls-localstack was using, and was there a specific reason behind it?

@whummer

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

@aaronstaves @nealeu Please see the following PR which partially reverts and slightly reimplements the in logic added in #24, due to async code required upon initialization of the plugin: #26

Please check out the latest version and report here if your use case is not covered - specifically, if you need to enable the plugin for a lifecycle event whose name does not start with before:...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.