Flexible AWS Lambda proxy server. Unlike other solutions, it supports any request/response payload (gzip, br, image, xml, json, etc.). Also you can easily enable CORS for endpoints which don't allow cross-origin requests.
git clone https://github.com/PaulAnnekov/mighty-lambda-proxy.git
cd mighty-lambda-proxy
npm install
npx serverless deploy -v # or node_modules/.bin/serverless deploy -v
In the output you will see your endpoint url. To make it proxy your request,
just add ?url=[target]
in the end, e.g.:
https://abcdefghij.execute-api.eu-central-1.amazonaws.com/dev?url=https://example.com
By default function asks Lambda service for timeout value (getRemainingTimeInMillis()). But you can specify your own timeout value by following "Set usagePlan, CORS settings, proxy timeout" guide below.
npx serverless deploy --stage prod
npx serverless deploy --region eu-central-1
Set UsagePlan, CORS settings, proxy timeout
- Copy
serverless.vars.sample.yml
and rename toserverless.vars.yml
- In
serverless.vars.yml
modify and leave options you need