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

The optional Outputs section declares the values that you want to return in response to describe stack calls. For example, you can output the Amazon S3 bucket name for your stack so that you can easily find it.

Important

During a stack update, you cannot update outputs by themselves. You can update outputs only when you include changes that add, modify, or delete resources.

Syntax

The Outputs section consists of the key name Outputs, followed by a single colon. Braces enclose all output declarations. If you declare multiple outputs, they are delimited by commas. You can declare a maximum of 60 outputs in an AWS CloudFormation template. The following pseudo template outlines the Outputs section:

"Outputs" : {
  "Logical ID" : {
    "Value" : "Value to return",
    "Description" : "Information about the value"
  }
}
Value (required)

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

Description (optional)

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

Note

You can conditionally create outputs by adding a Condition property and then refer to a condition that is defined in the Conditions section of a template.

Examples

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" }
  }
}