From 209ef4942c7601999dcf1f729ea8847cdd2a03ad Mon Sep 17 00:00:00 2001 From: Manthan Mallikarjun Date: Mon, 6 May 2019 01:34:25 -0700 Subject: [PATCH] fix(aws): require explicit aws environment variable flag --- src/route.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/route.ts b/src/route.ts index 45bf9d0a..09efc32e 100644 --- a/src/route.ts +++ b/src/route.ts @@ -44,9 +44,7 @@ export default (route: Route): Handler => { exec = route.plugins.reverse().reduce((acc, val): any => val(acc), exec); } - const isAWS: boolean = !!( - (process.env.LAMBDA_TASK_ROOT && process.env.AWS_EXECUTION_ENV) || false - ); + const isAWS: boolean = process.env.LIGHT_ENVIRONMENT === 'aws'; if (isAWS) { return AWSServerlessMicro(handleErrors(exec)); }