{"record":{"id":"e216094d10c79c97","repo":"quarkusio/quarkus","slug":"dynamodb-records-are-too-specific-it-is-not-suppo","errorCode":null,"errorMessage":"DynamoDB records are too specific. It is not supported to extract a message from them. Use the DynamodbStreamRecord in your funq method, or use EventBridge Pipes with CloudEvents.","messagePattern":"DynamoDB records are too specific\\. It is not supported to extract a message from them\\. Use the DynamodbStreamRecord in your funq method, or use EventBridge Pipes with CloudEvents\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/event/dynamodb/DynamoDbEventHandler.java","lineNumber":32,"sourceCode":"\npublic class DynamoDbEventHandler implements EventHandler<DynamodbEvent, DynamodbStreamRecord, StreamsEventResponse> {\n\n    @Override\n    public Stream<DynamodbStreamRecord> streamEvent(DynamodbEvent event, FunqyAmazonConfig amazonConfig) {\n        if (event == null) {\n            return Stream.empty();\n        }\n        return event.getRecords().stream();\n    }\n\n    @Override\n    public String getIdentifier(DynamodbStreamRecord message, FunqyAmazonConfig amazonConfig) {\n        return message.getDynamodb().getSequenceNumber();\n    }\n\n    @Override\n    public Supplier<InputStream> getBody(DynamodbStreamRecord message, FunqyAmazonConfig amazonConfig) {\n        throw new IllegalStateException(\"\"\"\n                DynamoDB records are too specific. It is not supported to extract a message from them. \\\n                Use the DynamodbStreamRecord in your funq method, or use EventBridge Pipes with CloudEvents.\n                \"\"\");\n    }\n\n    @Override\n    public StreamsEventResponse createResponse(List<String> failures, FunqyAmazonConfig amazonConfig) {\n        if (!amazonConfig.advancedEventHandling().dynamoDb().reportBatchItemFailures()) {\n            return null;\n        }\n        return StreamsEventResponse.builder().withBatchItemFailures(\n                failures.stream().map(id -> StreamsEventResponse.BatchItemFailure.builder()\n                        .withItemIdentifier(id).build()).toList())\n                .build();\n    }\n\n    @Override\n    public Class<DynamodbStreamRecord> getMessageClass() {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/event/dynamodb/DynamoDbEventHandler.java#L14-L50","documentation":"The DynamoDB stream event handler for Funqy cannot extract a generic message body from a DynamoDB stream record because the record format is too specific. Instead of silently producing bad input, getBody always throws IllegalStateException directing you to consume DynamodbStreamRecord directly or route via EventBridge Pipes with CloudEvents.","triggerScenarios":"A funq method bound to a DynamoDB stream trigger declares a generic parameter (String/POJO) instead of DynamodbStreamRecord; getBody is invoked when the Lambda receives a DynamoDB update event.","commonSituations":"Subscribing a Funqy function directly to a DynamoDB stream while expecting generic JSON input; migrating a function from another trigger type to DynamoDB streams without changing the method signature.","solutions":["Change the funq method parameter type to DynamodbStreamRecord","Or put EventBridge Pipes between the DynamoDB stream and the Lambda and consume CloudEvents","Or read the raw event type manually instead of relying on the generic binding"],"exampleFix":"// before\npublic void fun(String message) { ... }\n// after\npublic void fun(DynamodbStreamRecord record) { ... }","handlingStrategy":"type-guard","validationCode":"// guard before relying on generic body extraction\nif (record instanceof DynamodbStreamRecord) {\n    // handle via typed handler, never via generic getBody\n}","typeGuard":"boolean isDynamoRecord(Object evt) {\n    return evt instanceof DynamodbStreamRecord;\n}","tryCatchPattern":"try {\n    return handler.getBody(message, config);\n} catch (IllegalStateException e) {\n    // fall back to typed DynamodbStreamRecord handling\n}","preventionTips":["Always declare DynamodbStreamRecord as the funq parameter for DynamoDB stream triggers","Prefer EventBridge Pipes with CloudEvents for generic payloads","Re-check trigger-to-parameter mapping when changing event sources"],"tags":["dynamodb","aws-lambda","funqy","event-binding"],"backgroundTag":"unsupported-event-binding","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"}