David Webster
David Webster

Reputation: 2333

How to list all stacks outputs currently deployed to an AWS account

I currently have three cloudformation stacks:

  1. kms-stack
  2. vpc-stack
  3. sqs-stack

They all export outputs that I can see when I describe that stack but when I run:

aws cloudformation list-exports

Only the outputs from the vpc stack are printed to the CLI.

Upvotes: 0

Views: 875

Answers (2)

chris
chris

Reputation: 37480

The output of a stack, and the exports from a stack, are not the same thing.

Output of a stack is specified in the Output section. Each element you include in the output can also be exported if so desired. Exports must be unique within a region.

aws cloudformation list-exports 

will list ALL exported values from all stacks within a region;

So review your cloudformation scripts for each stack and determine if you are actually exporting the values you need.

In the following VPC example, the VPC id will be exported; the IGW will not although both will be displayed in describe-stacks:

Outputs:
  VPC:
    Value:
      Ref: VPC
    Export:
      Name: MyVpcID
  InternetGateway:
    Value:
      Ref: InternetGateway

Upvotes: 1

krishna_mee2004
krishna_mee2004

Reputation: 7366

You should be using describe-stacks CLI to get the information. Use the following command:

aws cloudformation describe-stacks

CLI details can be found here.

Upvotes: 0

Related Questions