code: func deploymentsToWatch(stack *cloudformation.Stack) (map[string]*ecsDeployment, error) {
  	deployments := output(stack, deploymentsOutput)
  	services := output(stack, servicesOutput)
  	if deployments == nil {
  		return nil, fmt.Errorf("deployments output missing from stack")
  	}
  	if services == nil {
  		return nil, fmt.Errorf("services output missing from stack")
  	}
  
  	arns := extractProcessData(*services.OutputValue)
  	deploymentIDs := extractProcessData(*deployments.OutputValue)
  
  	if len(arns) == 0 {
  		return nil, fmt.Errorf("no services found in output")
  	}
  	if len(deploymentIDs) == 0 {
  		return nil, fmt.Errorf("no deploymentIDs found in output")
  	}
  
  	ecsDeployments := make(map[string]*ecsDeployment)
  	for p, a := range arns {
  		deploymentID, ok := deploymentIDs[p]
  		if !ok {
  			return nil, fmt.Errorf("deployment id not found for process: %v", p)
  		}
  		ecsDeployments[a] = &ecsDeployment{
  			process: p,
  			ID:      deploymentID,
  		}
  	}
  	return ecsDeployments, nil
  }
docs: // deploymentsToWatch returns an array of ecsDeployments for the given cloudformation stack