

# sam list stack-outputs
<a name="sam-cli-command-reference-sam-list-stack-outputs"></a>

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) `sam list stack-outputs` subcommand.

For an introduction to the AWS SAM CLI, see [What is the AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli)

The `sam list stack-outputs` subcommand displays the outputs of your AWS CloudFormation stack from an AWS Serverless Application Model (AWS SAM) or CloudFormation template. For more information on `Outputs`, see [Outputs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html) in the *AWS CloudFormation User Guide*.

## Usage
<a name="sam-cli-command-reference-sam-list-stack-outputs-usage"></a>

```
$ sam list stack-outputs <options>
```

## Options
<a name="sam-cli-command-reference-sam-list-stack-outputs-options"></a>

`--config-env TEXT`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-config-env"></a>
The environment name specifying the default parameter values in the configuration file to use.  
*Default value*: `default`  
For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--config-file TEXT`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-config-file"></a>
The path and file name of the configuration file containing default parameter values to use.  
*Default value*: `samconfig.toml` in current working directory.  
For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--debug`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-debug"></a>
Turn on debug logging to print debug messages generated by the AWS SAM CLI with timestamps.

`--help, -h`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-help"></a>
Show this message and exit.

`--output [json|table]`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-output"></a>
Specify the format to output results.  
*Default value*: `table`

`--profile TEXT`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-profile"></a>
Select a specific profile from your credential file to get AWS credentials.

`--region TEXT`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-region"></a>
Set the AWS region of the service. For example, `us-east-1`.

`--save-params`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-save-params"></a>
Save the parameters that you provide at the command line to the AWS SAM configuration file.

`--stack-name TEXT`  <a name="sam-cli-command-reference-sam-list-stack-outputs-options-"></a>
Name of the deployed CloudFormation stack. The stack name can be found in your application's `samconfig.toml` file or designated configuration file.  
This option is required.

## Examples
<a name="sam-cli-command-reference-sam-list-stack-outputs-examples"></a>

Displays the outputs, in table format, of resources in your CloudFormation stack named `test-stack`.

```
$ sam list stack-outputs --stack-name test-stack --output table
			
------------------------------------------------------------------------------------------------------------------------
OutputKey                                OutputValue                              Description
------------------------------------------------------------------------------------------------------------------------
HelloWorldFunctionIamRole                arn:aws:iam::account-number:role/sam-      Implicit IAM Role created for Hello
                                         app-test-list-HelloWorldFunctionRole-    World function
                                         SRJDMJ6F7F41
HelloWorldApi                            https://uj80uoe2o2.execute-api.us-       API Gateway endpoint URL for Prod
                                         east-1.amazonaws.com/Prod/hello/         stage for Hello World function
HelloWorldFunction                       arn:aws:lambda:us-                       Hello World Lambda Function ARN
                                         east-1:account-number:function:sam-app-
                                         test-list-
                                         HelloWorldFunction-H85Y7yIV7ZLq
------------------------------------------------------------------------------------------------------------------------
```