You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use node-http-proxy in my lambda function but it is giving error of Lambda Task timed out (no matter how long i keep Lambda timeout). How can I use this http-proxy in Lambda ?
I am trying to use node-http-proxy in my lambda function but it is giving error of Lambda Task timed out (no matter how long i keep Lambda timeout). How can I use this http-proxy in Lambda ?
here is my code:
app.js:
"use strict";
const express = require("express");
const app = express();
const httpProxy = require("http-proxy");
const proxy = httpProxy.createProxyServer({});
app.use('/', (req, res) => proxy.web(req, res, { target: 'www.google.com' }));
module.exports = app;
lambda.js
'use strict'
const awsServerlessExpress = require('aws-serverless-express')
const app = require('./app')
const binaryMimeTypes = [
'application/octet-stream',
'font/eot',
'font/opentype',
'font/otf',
'image/jpeg',
'image/png',
'image/svg+xml'
]
const server = awsServerlessExpress.createServer(app, null, binaryMimeTypes);
exports.handler = (event, context) => awsServerlessExpress.proxy(server, event, context)
The text was updated successfully, but these errors were encountered: