CloudFormation
The first service we will look at is CloudFormation. This makes sense as the APIs found in here will give us a starting point for finding information about the resources in a given stack.
The describeStacks endpoint
This endpoint is responsible for listing all stacks associated with a particular AWS account. For a given stack, its response looks like the following:
{"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, it doesn't say anything about which resources belong to this stack. It does, however, give us the stack name, which we can use to look up resources in the next service.
The describeStackResources endpoint
This endpoint receives many arguments, but the one we're interested in is the stack name, which, once provided, returns the following:
{"StackResources"...