AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Outputs Declaration

The template Outputs section enables you to return one or more values to the user in response to the aws cloudformation describe-stacks command.

To declare the Outputs section, the double-quoted key name Outputs is followed by a single colon. All outputs declared in the Outputs section are contained within a single set of braces, and are delimited by a comma.

Note

If present, the Outputs section must declare at least one stack output. There can be a maximum of 60 outputs in an AWS CloudFormation template.

Each output is composed of a double-quoted key name, a single colon, and one or more properties.

The Output properties are described in the following list:

Value (required)

The value of the property that is returned by the aws cloudformation describe-stacks command.

Condition (optional)

A String that names a condition. To set up a requirement for the returned output values, reference a condition that is defined in the Conditions section of a template.

Description (optional)

A String type up to 4K in length describing the output value.

Output properties are declared like any other property. In the following example, the output named LoadBalancer returns the information for the resource with the logical name BackupLoadBalancer if the CreateProdResources condition is true.

"Outputs" : {
   "LoadBalancer" : {
      "Condition" : "CreateProdResources",
      "Value" : { "Ref" : "BackupLoadBalancer" }
   }
}