File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ The readiness check port/path and traffic port can be configured using environme
106
106
| AWS_LWA_PASS_THROUGH_PATH | the path for receiving event payloads that are passed through from non-http triggers | "/events" |
107
107
| AWS_LWA_AUTHORIZATION_SOURCE | a header name to be replaced to ` Authorization ` | None |
108
108
| AWS_LWA_ERROR_STATUS_CODES | comma-separated list of HTTP status codes that will cause Lambda invocations to fail (e.g. "500,502-504,422") | None |
109
+ | AWS_LWA_PROXY_LAMBDA_RUNTIME_API | overwrites ` AWS_LAMBDA_RUNTIME_API ` to allow proxying request (not affecting registration) | None |
109
110
110
111
> ** Note:**
111
112
> We use "AWS_LWA_ " prefix to namespacing all environment variables used by Lambda Web Adapter. The original ones will be supported until we reach version 1.0.
Original file line number Diff line number Diff line change @@ -310,6 +310,13 @@ impl Adapter<HttpConnector, Body> {
310
310
let compression = self . compression ;
311
311
let invoke_mode = self . invoke_mode ;
312
312
313
+ if let Ok ( runtime_proxy) = env:: var ( "AWS_LWA_PROXY_LAMBDA_RUNTIME_API" ) {
314
+ // overwrite the env variable since
315
+ // LambdaInvokeMode::Buffered => lambda_http::run(svc).await,
316
+ // calls the lambda lambda_runtime::run which doesn't allow to change the client URI
317
+ env:: set_var ( "AWS_LAMBDA_RUNTIME_API" , runtime_proxy) ;
318
+ }
319
+
313
320
if compression {
314
321
let svc = ServiceBuilder :: new ( ) . layer ( CompressionLayer :: new ( ) ) . service ( self ) ;
315
322
match invoke_mode {
You can’t perform that action at this time.
0 commit comments