quarkusio/quarkus · error · RuntimeException
Too many functions. You need to set quarkus.funqy.export
Error message
Too many functions. You need to set quarkus.funqy.export
What it means
When multiple Funqy functions are registered and no quarkus.funqy.export is configured, the Lambda binding cannot determine which function to invoke, so it throws this RuntimeException instructing you to set the export property.
Source
Thrown at extensions/funqy/funqy-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/FunqyLambdaBindingRecorder.java:98
ObjectWriter writer = objectMapper.writerFor(javaOutputType);
invoker.getBindingContext().put(ObjectWriter.class.getName(), writer);
}
}
}
public void chooseInvoker() {
// this is done at Runtime so that we can change it with an environment variable.
if (runtimeConfig.getValue().export().isPresent()) {
invoker = FunctionRecorder.registry.matchInvoker(runtimeConfig.getValue().export().get());
if (invoker == null) {
throw new RuntimeException(
"quarkus.funqy.export does not match a function: " + runtimeConfig.getValue().export().get());
}
} else if (FunctionRecorder.registry.invokers().size() == 0) {
throw new RuntimeException("There are no functions to process lambda");
} else if (FunctionRecorder.registry.invokers().size() > 1) {
throw new RuntimeException("Too many functions. You need to set quarkus.funqy.export");
} else {
invoker = FunctionRecorder.registry.invokers().iterator().next();
}
ObjectReader objectReader = null;
if (invoker.hasInput()) {
objectReader = (ObjectReader) invoker.getBindingContext().get(ObjectReader.class.getName());
if (amazonBuildTimeConfig.advancedEventHandling().enabled()) {
// We create a copy, because the mapper will be reconfigured for the advanced event handling,
// and we do not want to adjust the ObjectMapper, which is available in arc context.
JsonMapper jsonMapper = AmazonLambdaMapperRecorder.objectMapper;
JsonMapper.Builder builder = jsonMapper.rebuild();
reader = new AwsEventInputReader(builder, objectReader, amazonBuildTimeConfig);
} else {
reader = new JacksonInputReader(objectReader);
}
View on GitHub (pinned to e1c734241f)
Solutions
- Set quarkus.funqy.export (or FUNQY_EXPORT env var in the Lambda console) to the name of the function to invoke
- Keep only one @Funq function in the deployment if a single handler is intended
- Split functions across separate Lambda deployments
Example fix
// before # two @Funq methods, no export // after quarkus.funqy.export=processOrder
Defensive patterns
Strategy: validation
Validate before calling
if (registeredFunctionNames.size() > 1 && System.getenv("QUARKUS_FUNQY_EXPORT") == null) {
throw new IllegalStateException("Multiple @Funq functions; set quarkus.funqy.export");
} Prevention
- Set quarkus.funqy.export as soon as a second function is added
- Prefer one function per Lambda deployment
- Audit @Funq usage after merges and refactorings
When it happens
Trigger: Application registers two or more @Funq functions and quarkus.funqy.export is absent (or not settable via the Lambda environment) at runtime.
Common situations: Added a second @Funq method to an app that previously had one; merged codebases each with their own function; export env var accidentally removed from the Lambda configuration.
Related errors
- quarkus.funqy.export does not match a function: ${export}
- There are no functions to process lambda
- Could not deserialize the provided message.
- Could not serialize the provided output.
- DynamoDB records are too specific. It is not supported to ex
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/b44ec403e9f30ba0.
Report an issue: GitHub.