question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serverless Deploy behind corporate proxy

See original GitHub issue

Hi, I try to deploy the standard hello world appliction behind a corporate proxy from a windows client. I tryed it also on a linux vm an it also didn’t work. Trying the same thing with the same computer with a direct connection it worked.

Description

For bug reports:

  • What went wrong? Deployment behind a corporate proxy does not work.

  • What did you expect should have happened? serverless deploy should deploy hello world function

  • What was the config you used?

service: hello-world
provider:
  name: aws
  runtime: nodejs6.10
  stage: dev
  region: eu-central-1

functions:
  hello:
    handler: handler.hello

Standard hello world handler code

'use strict';


module.exports.hello = (event, context, callback) => {
  const response = {
    statusCode: 200,
    body: JSON.stringify({
      message: 'Go Serverless v1.0! Your function executed successfully!',
      input: event,
    }),
  };

  callback(null, response);

  // Use this code if you don't use the http event with the LAMBDA-PROXY integration
  // callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event });
};
  • What stacktrace or error message from your provider did you see?
  Serverless Error ---------------------------------------

     Unexpected close tag
Line: 115
Column: 7
Char: >

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                 win32
     Node Version:       6.10.2
     Serverless Version: 1.11.0

Stacktrace with SLS_DEBUG=*

ServerlessError: Unexpected close tag Line: 115 Column: 7 Char: > at Response.req.send (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:163:20) at Request.<anonymous> (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:355:18) at Request.callListeners (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\sequential_executor.js:105:20) at Request.emit (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\sequential_executor.js:77:10) at Request.emit (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:668:14) at Request.transition (D:\Users\MyUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:22:10) at AcceptorStateMachine.runTo (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\state_machine.js:14:12) at D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\state_machine.js:26:10 at Request.<anonymous> (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:38:9) at Request.<anonymous> (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:670:12) at Request.callListeners (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\sequential_executor.js:115:18) at Request.emit (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\sequential_executor.js:77:10) at Request.emit (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:668:14) at Request.transition (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\request.js:22:10) at AcceptorStateMachine.runTo (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\state_machine.js:14:12) at D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\state_machine.js:26:10 From previous event: at persistentRequest (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:151:14) at doCall (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:130:9) at BbPromise (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:141:14) From previous event: at persistentRequest (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:128:38) at AwsProvider.request (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:144:12) at AwsDeploy.BbPromise.bind.then.then (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\configureStack.js:23:35) From previous event: at AwsDeploy.configureStack (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\configureStack.js:23:10) From previous event: at Object.deploy:initialize [as fn] (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\index.js:42:10) at BbPromise.reduce (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:210:55) at runCallback (timers.js:666:20) at tryOnImmediate (timers.js:639:5) at processImmediate [as _immediateCallback] (timers.js:611:5) From previous event: at PluginManager.invoke (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:210:22) at PluginManager.run (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:225:17) at Serverless.run (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js:97:31) at serverless.init.then (D:\Users\myUser\AppData\Roaming\npm\node_modules\serverless\bin\serverless:23:50)

Unfortunately I did not find anything while googleling for that error and the proxy setting HTTP_PROXY and HTTPS_PROXY are set. Is there anything I am missing here? Any help would be greate. Thx

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
felixbeckercommented, Apr 27, 2017

@pmuens and @jason-riddle , sorry for the late reply I was kind of busy the last days. And thanks for jumping in. The code for the fix looks good 👍

According to the #3508 proxy definition: As far as I could see, the code does contain already something similar for the proxy definition in the following lines. https://github.com/serverless/serverless/blob/master/lib/plugins/aws/provider/awsProvider.js#L105-L117

I think I need to verify a little deeper if this is just a settings issue on our site or if we have a n issue.

Thanks again for the quick reply

0reactions
pmuenscommented, May 4, 2017

Sorry that I cannot be more precise but it just does not work in the coperate enviroment (but like I said this can also come from the IT lock dow

Thanks for taking the time to look into it. Might be really something weird going on with the SDK.

p.s: If you prefer to close the issues I’ll be fine and happy to return if I have any results here.

That sounds like a good idea! Just keep us posted and we’ll repone!

Thanks everyone for the help so far 👍 !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Behind a corporate proxy - Serverless Forums
Hello, I am sitting behind a proxy at work and want to deploy some demo functions to evaluate serverless. Can I configure a...
Read more >
serverless deploy From Behind a Proxy? - Stack Overflow
I am able to install serverless but when I run serverless deploy I get the following error: Serverless: Injecting required Python packages to ......
Read more >
Bypassing corporate proxies (ab)using serverless for fun and ...
In this blogpost I thought a nice proof of concept would be to utilize serverless functionality to proxy arbitrary content from another website ......
Read more >
Implementing a serverless API proxy in 10 minutes - Medium
After deployment, such functions will run on Node.js on your preferred serverless platform, such as AWS Lambda, Google functions, or others as ...
Read more >
Implementing a serverless API proxy in 10 minutes - LinkedIn
deploy on a customized domain name (removing the banner by the way) · write new features in existing apps · create reusable serverless...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found