-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
sam local start-api detached mode #1012
Comments
Proposed feature is really handy, I like it, but there are some open questions and to me, this flag seems to be not that simple.
Does that make sense, @frob? |
Yes that is what I am referring to.
Does SAM CLI currently work with multiple templates? I was thinking of single endpoints, but I could see it being useful for multiple. The purpose for this is for integration testing so as many endpoints as needed for the test and I can see an argument for multiple endpoints being required for a full integration test. Honestly, it is usually these features work better if they start small and then we can add features in another issue.
I am unclear about this. I kind of think that logging would just follow the current workflow for docker.
Good point. Docker run docs use |
Any updates on this? |
Can it be just "dockerized"? So instead of running "sam local start-api" we run "docker-compose up"? |
The second time I run into this issue, current use cases:
|
I think this would be really helpful. I have similar use cases, my current method I am testing (which might be a little dodgy) is to send the sam local start-api > /dev/null 2>&1 & This keeps the local API active while retaining control of the shell. So you could run it multiple times, or re-use the shell to run tests against the local API. Potential issue when it comes to stopping the background processes if you have multiple running and need to be careful with which you kill. |
Running into a similar situation. Using this in a Makefile in interim:
|
+1 Would love to see this command being implemented. |
+1 This would be helpful. |
Describe your idea/feature/enhancement
Allow
sam local start-api
to run detachedProposal
While SAM is great for local development it can fall short for CI or even test commands. In order to run tests automatically against my api-gateway I need to run
sam local start-api
this command continues running until I press Ctrl-C. This works well for local development but I would like to script this out into a CI that will allow me to run integration tests without deploying to aws.Things to consider:
Will this require any updates to the SAM Spec
Additional arguments/commands
sam local stop-api
as a way to stop the api. This command would be dependent on the directory and template that is running and thus the running instance would be a singleton.-d
as this would follow the docker command scheme and be more familiar to developers.The text was updated successfully, but these errors were encountered: