Skip to content

sam local start-api detached mode #1012

Open
@frob

Description

@frob

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

    • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions