AWS: Change Default environment values
I've faced the "The key must start with a letter and can only contain letters, numbers, and underscores." issue in the AWS lambda. So both _HANDLER and spring.cloud.function.definition were not enabled to be added as environment variables. Let me know your thoughts.
This commit is contained in:
@@ -122,7 +122,7 @@ public class CustomRuntimeEventLoop {
|
||||
}
|
||||
|
||||
private static FunctionInvocationWrapper locateFunction(FunctionCatalog functionCatalog, MediaType contentType) {
|
||||
String handlerName = System.getenv("_HANDLER");
|
||||
String handlerName = System.getenv("DEFAULT_HANDLER");
|
||||
FunctionInvocationWrapper function = functionCatalog.lookup(handlerName, contentType.toString());
|
||||
if (function == null) {
|
||||
handlerName = System.getenv("spring.cloud.function.definition");
|
||||
|
||||
Reference in New Issue
Block a user