aws / aws/aws-sam-cli

sam local start-api detached mode

Open
#1,012 9 comments 33 reactions 0 assignees View on GitHub
area/local/start-api maintainer/need-response stage/needs-feedback type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

Allow `sam local start-api` to run detached

### Proposal

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:
1. Will this require any updates to the [SAM Spec](https://github.com/awslabs/serverless-application-model)
- No, as far as I know, this should require any updates to the spec.

2. Additional arguments/commands
- By adding a detached mode that also means there must be a non-interrupt way to stop the api. I suggest `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.
- I would suggest `-d` as this would follow the docker command scheme and be more familiar to developers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.