aws cloudformation list outputs

You can get specific resources created by a Cloudformation stack like so:

STACK_NAME=video-player
aws cloudformation list-stack-resources --stack-name $STACK_NAME \
  | jq '.StackResourceSummaries | .[] | select(.LogicalResourceId | contains("WebsiteLogsBucket"))' \
  | jq -cr .PhysicalResourceId

Which will return something like this:

video-player-websitelogsbucket-wnxaskuel

Leave a Reply

Your email address will not be published. Required fields are marked *