code: func taskDefinitionToProcess(td *ecs.TaskDefinition) (*twelvefactor.Process, error) {
  	// If this task definition has no container definitions, then something
  	// funky is up.
  	if len(td.ContainerDefinitions) == 0 {
  		return nil, errors.New("task definition had no container definitions")
  	}
  
  	container := td.ContainerDefinitions[0]
  
  	var command []string
  	for _, s := range container.Command {
  		command = append(command, *s)
  	}
  
  	env := make(map[string]string)
  	for _, kvp := range container.Environment {
  		if kvp != nil {
  			env[aws.StringValue(kvp.Name)] = aws.StringValue(kvp.Value)
  		}
  	}
  
  	return &twelvefactor.Process{
  		Type:      aws.StringValue(container.Name),
  		Command:   command,
  		Env:       env,
  		CPUShares: uint(*container.Cpu),
  		Memory:    uint(*container.Memory) * bytesize.MB,
  		Nproc:     uint(softLimit(container.Ulimits, "nproc")),
  	}, nil
  }
docs: // taskDefinitionToProcess takes an ECS Task Definition and converts it to a
  // Process.