CloudFormation
The first service that we will look at is CloudFormation. This makes sense, as the APIs found there will give us a starting point for finding information about the resources in a given stack.
The describeStacks endpoint
The describeStacks
endpoint is responsible for listing all of the stacks associated with a particular AWS account. For a given stack, the response will look as follows:
{"Stacks" [{"StackId" "arn:aws:cloudformation:ap-southeast-2:337944750480:stack/DevStack-62031/1", "StackStatus" "CREATE_IN_PROGRESS", "StackName" "DevStack-62031", "Parameters" [{"ParameterKey" "DevDB", "ParameterValue" nil}]}]}
Unfortunately, this doesn't say anything about which resources belong to the stack. It does, however, give us the stack name, which we can use to look up resources in the next service.
The describeStackResources endpoint
The describeStackResources
endpoint receives many arguments, but the one that we're interested in is the stack name, which,...