2017-03-21 1 views
-1

AWS에 Lambda 함수로 배포 된 node.js를 사용하여 주어진 URL로 창을 열어야한다는 간단한 요구 사항이 있습니다. 다음은 예제 코드입니다. 람다 함수를 실행하면 Success로 반환되지만 브라우저가 열려 있지 않으므로 URL이 시작되지 않습니다. Windows 또는 Linux에서 동일한 코드를 실행하면 창을 시작할 수 있습니다.AWS lambda not open window using node.js

function summaryHandler (event, context, callback) { 
    console.log('Will open google page'); 
    var open = require('open'); 
    open('http://www.google.com'); 
    callback(null, 'Your window should be launched by now'); 
} 
exports.summaryHandler = summaryHandler; 

문제가있는 곳을 알려주세요.

답변