docs: public static String waitForCompletion(AmazonCloudFormation stackbuilder, String stackName) throws Exception {
  
          DescribeStacksRequest wait = new DescribeStacksRequest();
          wait.setStackName(stackName);
          Boolean completed = false;
          String  stackStatus = "Unknown";
          String  stackReason = "";
  
          System.out.print("Waiting");
  
          while (!completed) {
              List<Stack> stacks = stackbuilder.describeStacks(wait).getStacks();
              if (stacks.isEmpty())
              {
                  completed   = true;
                  stackStatus = "NO_SUCH_STACK";
                  stackReason = "Stack has been deleted";
              } else {
                  for (Stack stack : stacks) {
                      if (stack.getStackStatus().equals(StackStatus.CREATE_COMPLETE.toString()) ||
                              stack.getStackStatus().equals(StackStatus.CREATE_FAILED.toString()) ||
                              stack.getStackStatus().equals(StackStatus.ROLLBACK_FAILED.toString()) ||
                              stack.getStackStatus().equals(StackStatus.DELETE_FAILED.toString())) {
                          completed = true;
                          stackStatus = stack.getStackStatus();
                          stackReason = stack.getStackStatusReason();
                      }
                  }
              }
  
              // Show we are waiting
              System.out.print(".");
  
              // Not done yet so sleep for 10 seconds.
              if (!completed) Thread.sleep(10000);
          }
  
          // Show we are done
          System.out.print("done\n");
  
          return stackStatus + " (" + stackReason + ")";
      }