title: codedeploy appspec.yml failed to copy files to destination
body: <p><strong>appspe.yml script:</strong></p>
  
  <pre><code>version: 0.0
  os: linux
  files:
    - source: /
      destination: /home/ubuntu/
  permissions:
    - object: /home/ubuntu/
      owner: root
      group: root
      mode: 777
  hooks:
    BeforeInstall:
      - location: scripts/install_dependencies.sh
        timeout: 300
        runas: root
      - location: scripts/start_server.sh
        timeout: 300
        runas: root
    ApplicationStop:
      - location: scripts/stop_server.sh
        timeout: 300
        runas: root
  </code></pre>
  
  <p>Unfortunately, it didn't copy the files to <strong><code>/home/ubuntu/</code></strong> directory. With this, I am getting the following error while deploying through codedeploy</p>
  
  <blockquote>
    <p>LifecycleEvent - BeforeInstall Script -
    scripts/install_dependencies.sh Script - scripts/start_server.sh
    [stderr]cp: cannot stat 'scripts/gunicorn.service': No such file or
    directory [stderr]Failed to start gunicorn.service: Unit
    gunicorn.service not found. [stderr]Failed to execute operation: No
    such file or directory [stderr]Failed to restart gunicorn.service:
    Unit gunicorn.service not found. [stderr]cp: cannot stat
    'scripts/LIMA': No such file or directory [stderr]ln: failed to create
    symbolic link '/etc/nginx/sites-enabled/LIMA': File exists
    [stderr]ERROR: Bad port</p>
  </blockquote>
  
  <p>What went wrong here?</p>