From 3ccf1326ed0996a4e692b42316bf17f962b0a695 Mon Sep 17 00:00:00 2001 From: Steve Hu Date: Thu, 1 Feb 2024 21:40:46 -0500 Subject: [PATCH] fixes #78 Use NoneDecryptedInstance to load the config for registerModule --- .../java/com/networknt/aws/lambda/LambdaFunctionHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda-invoker/src/main/java/com/networknt/aws/lambda/LambdaFunctionHandler.java b/lambda-invoker/src/main/java/com/networknt/aws/lambda/LambdaFunctionHandler.java index b698a0e..8252c10 100644 --- a/lambda-invoker/src/main/java/com/networknt/aws/lambda/LambdaFunctionHandler.java +++ b/lambda-invoker/src/main/java/com/networknt/aws/lambda/LambdaFunctionHandler.java @@ -57,7 +57,7 @@ public LambdaFunctionHandler() { logger.error("An instance of MetricsHandler is not configured in the handler.yml."); } } - ModuleRegistry.registerModule(LambdaInvokerConfig.CONFIG_NAME, LambdaFunctionHandler.class.getName(), config.getMappedConfig(), null); + ModuleRegistry.registerModule(LambdaInvokerConfig.CONFIG_NAME, LambdaFunctionHandler.class.getName(), Config.getNoneDecryptedInstance().getJsonMapConfigNoCache(LambdaInvokerConfig.CONFIG_NAME), null); if(logger.isInfoEnabled()) logger.info("LambdaFunctionHandler is loaded."); } @@ -190,7 +190,7 @@ public static void reload() { logger.error("An instance of MetricsHandler is not configured in the handler.yml."); } } - ModuleRegistry.registerModule(LambdaInvokerConfig.CONFIG_NAME, LambdaFunctionHandler.class.getName(), config.getMappedConfig(), null); + ModuleRegistry.registerModule(LambdaInvokerConfig.CONFIG_NAME, LambdaFunctionHandler.class.getName(), Config.getNoneDecryptedInstance().getJsonMapConfigNoCache(LambdaInvokerConfig.CONFIG_NAME), null); if(logger.isInfoEnabled()) logger.info("LambdaFunctionHandler is loaded."); } }