LocalStack CLI Manual
4 minute read
The LocalStack command-line interface (CLI) is a tool for starting, managing, and configuring your LocalStack container. It provides convenience features that make it easier to use LocalStack, and use LocalStack tools like Cloud Pods, Extensions, and more. The localstack
CLI syntax is:
$ localstack [OPTIONS] COMMAND [ARGS]...
Options
The following options are available for the localstack
CLI.
--version
The --version
option is used to display the version of the LocalStack CLI.
$ localstack --version
--debug
The --debug
option is used to enable debug mode for the LocalStack CLI.
$ localstack --debug
--help
The --help
option is used to display the help message for the LocalStack CLI.
$ localstack --help
--profile
The --profile
option is used to specify the configuration profile to use for the LocalStack CLI.
$ localstack --profile <PROFILE>
Commands
The following commands are available for the localstack
CLI.
login
The login
command is used to authenticate with the LocalStack Platform. It is required to use advanced features like Cloud Pods and Extensions.
$ localstack login [OPTIONS]
The options available for the login
command are:
Name, Shorthand | Default | Description |
---|---|---|
--password , -p | Password | |
--username , -u | Username | |
--password-stdin , -s | Take the password from stdin |
logout
The logout
command is used to log out of the LocalStack Platform.
$ localstack logout
update
The update
command is used to update the LocalStack CLI to the latest version.
$ localstack update [OPTIONS] COMMAND [ARGS]...
The commands available for the update
command are:
Name | Description |
---|---|
all | Updates all LocalStack components |
docker-images | Updates the LocalStack Docker images |
localstack-cli | Updates the LocalStack CLI |
config
The config
command is used to inspect your LocalStack configuration.
$ localstack config [OPTIONS] COMMAND [ARGS]...
The commands available for the config
command are:
Name | Description |
---|---|
show | Shows the LocalStack configuration values |
validate | Validates the LocalStack configuration values |
start
The start
command is used to start your LocalStack container.
$ localstack start [OPTIONS]
The options available for the start
command are:
Name, Shorthand | Default | Description |
---|---|---|
--detached , -d | Run the LocalStack container in detached mode | |
--docker | Start LocalStack in a Docker container (default) | |
--host | Start LocalStack directly on the host machine | |
--no-banner | Disable the LocalStack banner |
stop
The stop
command is used to stop your LocalStack container.
$ localstack stop [OPTIONS]
wait
The wait
command is used to wait for your LocalStack container to be ready.
$ localstack wait [OPTIONS]
The options available for the wait
command are:
Name, Shorthand | Default | Description |
---|---|---|
--timeout , -t | Timeout in seconds to wait for LocalStack to be ready |
status
The status
command is used to check the status of your LocalStack container and print status information.
$ localstack status [OPTIONS] COMMAND [ARGS]...
The commands available for the status
command are:
Name | Description |
---|---|
docker | Query information about the LocalStack Docker image and runtime |
services | Query information about running services in the LocalStack container |
daemons
The daemons
command is used to manage LocalStack daemon processes (e.g., required to start up EC2 virtual machines on the host).
$ localstack daemons [OPTIONS] COMMAND [ARGS]...
The commands available for the daemons
command are:
Name | Description |
---|---|
log | Show log of daemon process |
start | Start local daemon processes |
stop | Stop local daemon processes |
dns
The dns
command is used to manage the DNS settings of your host.
$ localstack dns [OPTIONS] COMMAND [ARGS]...
The commands available for the dns
command are:
Name | Description |
---|---|
systemd-resolved | Manage DNS settings of systemd-resolved |
extensions
LocalStack Extensions allow developers to extend and customize LocalStack. Extensions are a LocalStack Pro feature. To use and install extensions, use the CLI to first log in to your account.
$ localstack extensions [OPTIONS] COMMAND [ARGS]...
The commands available for the extensions
command are:
Name | Description |
---|---|
install | Install an extension |
uninstall | Uninstall an extension |
init | Initialize an extension |
dev | Developer tools for developing LocalStack extensions |
pod
The pod
command is used to manage Cloud Pods. Cloud Pods is a LocalStack Pro feature. To use Cloud Pods, use the CLI to first log in to your account.
$ localstack pod [OPTIONS] COMMAND [ARGS]...
The commands available for the pod
command are:
Name | Description |
---|---|
save | Create a new Cloud Pod |
load | Load a Cloud Pod from a file or URL into running LocalStack container |
list | List all Cloud Pods in your account |
delete | Delete a Cloud Pod from your account |
inpsect | Inspect the contents of a Cloud Pod |
versions | List all available versions of a Cloud Pod |
An extended CLI manual for Cloud Pods is available on the Cloud Pods CLI manual.
reset
The reset
command is used to reset the service states of the running LocalStack container.
$ localstack reset [OPTIONS]
The options available for the reset
command are:
Name, Shorthand | Default | Description |
---|---|---|
--persistence , -p | Reset the persistence directory (set with PERSISTENCE=1 ) | |
--services , -s | Comma-delimited list of services to reset. By default, it resets everything. |
ssh
The ssh
command is used to obtain a shell in the running LocalStack container.
$ localstack ssh [OPTIONS]
infra
The infra
command is used to manipulate the infrastructure of your LocalStack container. It is a legacy command and will be removed in a future release.
$ localstack infra [OPTIONS] COMMAND [ARGS]...