We now have all the information we need to start designing our application. We need to coordinate four different API calls per CloudFormation stack:
describeStacks: To list all available stacks
describeStackResources: To retrieve details of all resources contained in a stack
describeInstances: To retrieve details of all EC2 instances in a stack
describeDBInstances: To retrieve details of all DB2 instances in a stack
Next, I would like you to step back for a moment and think about how you would design code like this. Go ahead, I'll wait.
Now that you're back, let's have a look at one possible approach.
If we recall the screenshot of what the dashboard would look like, we realize that, for the purposes of our application, the difference ...