sam list stack-outputs
This page provides reference information for the Amazon Serverless Application Model Command Line Interface (Amazon SAM CLI)
sam list stack-outputs subcommand.
For an introduction to the Amazon SAM CLI, see What is the Amazon SAM CLI?
The sam list stack-outputs subcommand displays the outputs of your Amazon CloudFormation stack from an Amazon Serverless Application Model (Amazon SAM) or Amazon CloudFormation template. For more information on
Outputs, see Outputs
in the Amazon CloudFormation User Guide.
Usage
$sam list stack-outputs<options>
Options
--config-envTEXT-
The environment name specifying the default parameter values in the configuration file to use.
Default value:
defaultFor more information about configuration files, see Amazon SAM CLI configuration file.
--config-fileTEXT-
The path and file name of the configuration file containing default parameter values to use.
Default value:
samconfig.tomlin current working directory.For more information about configuration files, see Amazon SAM CLI configuration file.
--debug-
Turn on debug logging to print debug messages generated by the Amazon SAM CLI with timestamps.
--help, -h-
Show this message and exit.
--output [json|table]-
Specify the format to output results.
Default value:
table --profileTEXT-
Select a specific profile from your credential file to get Amazon credentials.
--regionTEXT-
Set the Amazon region of the service. For example,
us-east-1. --save-params-
Save the parameters that you provide at the command line to the Amazon SAM configuration file.
--stack-nameTEXT-
Name of the deployed Amazon CloudFormation stack. The stack name can be found in your application's
samconfig.tomlfile or designated configuration file.This option is required.
Examples
Displays the outputs, in table format, of resources in your Amazon 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 ------------------------------------------------------------------------------------------------------------------------