{"record":{"id":"52983fb5dab35586","repo":"quarkusio/quarkus","slug":"unable-to-find-handler-class-make-sure-your-deplo","errorCode":null,"errorMessage":"Unable to find handler class, make sure your deployment includes a single io.quarkus.amazon.lambda.runtime.RequestHandler or io.quarkus.amazon.lambda.runtime.RequestStreamHandler implementation","messagePattern":"Unable to find handler class, make sure your deployment includes a single io\\.quarkus\\.amazon\\.lambda\\.runtime\\.RequestHandler or io\\.quarkus\\.amazon\\.lambda\\.runtime\\.RequestStreamHandler implementation","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/amazon-lambda/deployment/src/main/java/io/quarkus/amazon/lambda/deployment/AmazonLambdaProcessor.java","lineNumber":227,"sourceCode":"                recorder.setHandlerClass(toRequestHandlerDefinition(requestHandlerJandexDefinition, context));\n            }\n        } else if (lambdas != null && lambdas.size() == 1) {\n            AmazonLambdaBuildItem item = lambdas.get(0);\n            if (item.isStreamHandler()) {\n                Class<? extends RequestStreamHandler> handlerClass = (Class<? extends RequestStreamHandler>) context\n                        .classProxy(item.getHandlerClass());\n                recorder.setStreamHandlerClass(handlerClass);\n\n            } else {\n                RequestHandlerJandexDefinition requestHandlerJandexDefinition = RequestHandlerJandexUtil\n                        .discoverHandlerMethod(item.getHandlerClass(), index.getComputingIndex());\n                registerForReflection(requestHandlerJandexDefinition, reflectiveMethods, reflectiveHierarchies);\n                recorder.setHandlerClass(toRequestHandlerDefinition(requestHandlerJandexDefinition, context));\n            }\n        } else if (lambdas == null || lambdas.isEmpty()) {\n            String errorMessage = \"Unable to find handler class, make sure your deployment includes a single \"\n                    + RequestHandler.class.getName() + \" or \" + RequestStreamHandler.class.getName() + \" implementation\";\n            throw new RuntimeException(errorMessage);\n        }\n    }\n\n    @BuildStep\n    @Record(ExecutionTime.RUNTIME_INIT)\n    public void recordBeanContainer(BeanContainerBuildItem beanContainerBuildItem,\n            AmazonLambdaRecorder recorder,\n            // try to order this after service recorders\n            List<ServiceStartBuildItem> orderServicesFirst) {\n        recorder.setBeanContainer(beanContainerBuildItem.getValue());\n\n    }\n\n    @BuildStep\n    @Record(ExecutionTime.RUNTIME_INIT)\n    public void recordHandlerClass(CombinedIndexBuildItem index,\n            List<AmazonLambdaBuildItem> lambdas,\n            Optional<ProvidedAmazonLambdaHandlerBuildItem> providedLambda,","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/amazon-lambda/deployment/src/main/java/io/quarkus/amazon/lambda/deployment/AmazonLambdaProcessor.java#L209-L245","documentation":"At build time the processor must record the single handler class for static init; the index found no implementations of RequestHandler or RequestStreamHandler (and no configured lambda), so no handler exists to deploy.","triggerScenarios":"recordStaticInitHandlerClass runs when neither the RequestHandler nor RequestStreamHandler branch found a class and the lambdas list from configuration is null/empty.","commonSituations":"Fresh project with the Lambda extension but no class implementing RequestHandler/RequestStreamHandler; handler class not annotated/packaged so Jandex indexing missed it (e.g. in a separate unindexed jar); renamed/deleted handler after adding the extension.","solutions":["Add a class implementing io.quarkus.amazon.lambda.runtime.RequestHandler or RequestStreamHandler to your application","Alternatively configure an explicit handler via application properties (quarkus.lambda.handler map) if using a provider","Ensure the handler class is in a module that gets Jandex-indexed (application classes are indexed automatically; external jars need a jandex index or quarkus.index-dependencies)","Check package spelling: implement Quarkus's runtime interfaces, not raw com.amazonaws.services.lambda.runtime.RequestHandler"],"exampleFix":"// after\npublic class MyHandler implements io.quarkus.amazon.lambda.runtime.RequestHandler<ApiGatewayProxyRequestEvent, ApiGatewayProxyResponseEvent> {\n  public ApiGatewayProxyResponseEvent handleRequest(ApiGatewayProxyRequestEvent event, Context context) { ... }\n}","handlingStrategy":"validation","validationCode":"// build-time check: fail compilation if no handler\nassertTrue(index.getAllKnownImplementors(\"io.quarkus.amazon.lambda.runtime.RequestHandler\").size() > 0 || lambdaConfigConfigured);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep exactly one class implementing Quarkus RequestHandler/RequestStreamHandler","Index external jars containing handlers (jandex or quarkus.index-dependencies)","Configure quarkus.lambda.handler.* when using providers instead of relying on discovery","Verify handler package names after refactors"],"tags":["quarkus","amazon-lambda","build","handler-not-found"],"backgroundTag":"missing-handler-implementation","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}