title: Serverless WSGI not working in pipelines (works locally)
body: <p>I have the following steps configured in our bitbucket pipeline:</p>
  <pre><code>          # Configure Serverless
            - cp requirements.txt src/requirements.txt
            - serverless config credentials --provider aws --key ${AWS_KEY} --secret ${AWS_SECRET}
            - cd src
            - sls plugin install -n serverless-python-requirements
            - sls plugin install -n serverless-wsgi
            - sls plugin install -n serverless-dotenv-plugin
  
            # Perform the Deployment
            - sls deploy --stage ${LOCAL_SERVERLESS_STAGE}
            - sls deploy list functions
  
            # Prep the environment
            - sls wsgi manage --command &quot;migrate&quot;
            - sls wsgi manage --command &quot;collectstatic --noinput&quot;
  </code></pre>
  <p>When the pipeline runs, the <code>sls deploy</code> works perfectly fine and the deployed function operates exactly as expected. The <code>sls wsgi manage</code> commands throw the following error, however:</p>
  <pre><code>  Serverless Error ----------------------------------------
   
    Function &quot;undefined&quot; doesn't exist in this Service
   
    Get Support --------------------------------------------
       Docs:          docs.serverless.com
       Bugs:          github.com/serverless/serverless/issues
       Issues:        forum.serverless.com
   
    Your Environment Information ---------------------------
       Operating System:          linux
       Node Version:              11.13.0
       Framework Version:         2.35.0
       Plugin Version:            4.5.3
       SDK Version:               4.2.2
       Components Version:        3.8.2
  </code></pre>
  <p>I can run the <code>sls wsgi manage</code> commands locally (with same AWS keys) without issue. The issue only seems to happen in the pipeline.</p>
  <p>Thoughts?</p>
  <h3>Additional Information</h3>
  <p><strong>serverless.yml</strong></p>
  <pre><code>service: service-api
  
  plugins:
    - serverless-python-requirements
    - serverless-wsgi
    - serverless-dotenv-plugin
  
  custom:
    wsgi:
      app: service.wsgi.application
      packRequirements: false
    pythonRequirements:
      dockerFile: ./serverless-dockerfile
      dockerizePip: non-linux
      pythonBin: python3
      useDownloadCache: false
      useStaticCache: false
  
  provider:
    name: aws
    runtime: python3.6
    stage: dev
    region: us-east-1
    iamRoleStatements:
      - Effect: &quot;Allow&quot;
        Action:
          - s3:GetObject
          - s3:PutObject
        Resource: &quot;arn:aws:s3:::*&quot;
    # vpc:
    #   securityGroupIds:
    #     - 
    #   subnetIds:
    #     - 
    #     - 
    #     - 
    #     - 
  
  functions:
    app:
      handler: wsgi.handler
      events:
        - http: ANY /
        - http: &quot;ANY {proxy+}&quot;
      timeout: 600
  </code></pre>
  <p><strong>Output of Serverless deploy list functions</strong></p>
  <pre><code>+ sls deploy list functions
  (node:1127) ExperimentalWarning: queueMicrotask() is experimental.
  (node:1127) ExperimentalWarning: The fs.promises API is experimental
  (node:1127) ExperimentalWarning: The dns.promises API is experimental
  Serverless: Deprecation warning: Detected &quot;.env&quot; files. In the next major release variables from &quot;.env&quot; files will be automatically loaded into the serverless build process. Set &quot;useDotenv: true&quot; to adopt that behavior now.
              More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES
  Serverless: DOTENV: Loading environment variables from .env:
  ...STUFF HERE...
  Serverless: Deprecation warning: CLI options definitions were upgraded with &quot;type&quot; property (which could be one of &quot;string&quot;, &quot;boolean&quot;, &quot;multiple&quot;). Below listed plugins do not predefine type for introduced options:
               - ServerlessWSGI for &quot;port&quot;, &quot;host&quot;, &quot;disable-threading&quot;, &quot;num-processes&quot;, &quot;ssl&quot;, &quot;command&quot;, &quot;file&quot;
              Please report this issue in plugin issue tracker.
              Starting with next major release, this will be communicated with a thrown error.
              More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
  Serverless: Configuration warning at 'functions.app.events[1].http': value 'ANY {proxy+}' does not satisfy pattern /^(?:\*|(GET|POST|PUT|PATCH|OPTIONS|HEAD|DELETE|ANY) (\/\S*))$/i
  Serverless:  
  Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
  Serverless:  
  Serverless: Deprecation warning: Starting with next major, Serverless will throw on configuration errors by default. Adapt to this behavior now by adding &quot;configValidationMode: error&quot; to service configuration
              More Info: https://www.serverless.com/framework/docs/deprecations/#CONFIG_VALIDATION_MODE_DEFAULT
  Serverless: Deprecation warning: Starting with version 3.0.0, following property will be replaced:
                &quot;provider.iamRoleStatements&quot; -&gt; &quot;provider.iam.role.statements&quot;
              More Info: https://www.serverless.com/framework/docs/deprecations/#PROVIDER_IAM_SETTINGS
  Serverless: Deprecation warning: Resolution of lambda version hashes was improved with better algorithm, which will be used in next major release.
              Switch to it now by setting &quot;provider.lambdaHashingVersion&quot; to &quot;20201221&quot;
              More Info: https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2
  Serverless: Listing functions and their last 5 versions:
  Serverless: -------------
  Serverless: app: $LATEST, 1, 2, 3
  </code></pre>