Serverless: Using a private Python package as a dependency

So the only way I managed to sort this issue was

  1. Configure the SSH WITH NO PASSPHRASE. Following steps here.
  2. In serverless.yml, I added the following:
    custom:
      wsgi:
        app: app.app
        packRequirements: false
      pythonRequirements:
        dockerizePip: true
        dockerSsh: true
        dockerSshSymlink: ~/.ssh

Notice I added dockerSshSymlink to report the location of the ssh files on my local machine; ~/.ssh.

  1. In requirements.txt, I added my private dependency like this:

    git+ssh://[email protected]/my_comp/my_repo.git#egg=MyRepo

All works.