Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.65 KB

get-deployment-status.md

File metadata and controls

52 lines (35 loc) · 1.65 KB

Get deployment status

The LetsGo CLI provides a command to inspect the deployment status of all components of your app: yarn ops status. It is a convenient way to:

  • Quickly check the health status of all components.
  • Inspect currently deployed configuration settings.
  • Discover the URLs of the web and API components.
  • Zero in on the CloudWatch log groups for each component to further inspect them in AWS.
  • Check the messages in flight in SQS.
  • Check the amount of data in the database.

You can get all of this information with:

yarn ops status

Or, just to limit the output to a single component, e.g. the API:

yarn ops status -a api

Like all other LetsGo CLI commands, you can specify the deployment name and region through options:

yarn ops status -d stage -r us-west-1

The -o json option generates the output in JSON and provides even more details than the textual form:

yarn ops status -o json

The -p option can be used to extract just a single property from the output, which is useful for scripting. For example, to get the URL of the API component you can call:

yarn -s ops status -a api -p 'api.apprunner.ServiceUrl'

NOTE Notice the -s option passed to yarn. This disables output normally generated by yarn so that only the value you are interested in is written to stdout.

In addition, you can construct simple JavaScript expressions using the -p option to further facilitate scripting, e.g.:

yarn -s ops status -a api -p 'api.apprunner.Status === "RUNNING" ? 1 : 0'

Related topics

LetsGo CLI