{"record":{"id":"1b04edd8195f19dd","repo":"quarkusio/quarkus","slug":"dynamodb-records-are-too-specific-it-is-not-suppo-1b04ed","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/PipesDynamoDbEventHandler.java","lineNumber":32,"sourceCode":"public class PipesDynamoDbEventHandler\n        implements EventHandler<List<DynamodbStreamRecord>, DynamodbStreamRecord, StreamsEventResponse> {\n\n    @Override\n    public Stream<DynamodbStreamRecord> streamEvent(List<DynamodbStreamRecord> event, FunqyAmazonConfig amazonConfig) {\n        if (event == null) {\n            return Stream.empty();\n        }\n        return event.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/PipesDynamoDbEventHandler.java#L14-L50","documentation":"The EventBridge Pipes DynamoDB event handler likewise refuses to extract a generic message body from a DynamoDB stream record; getBody always throws IllegalStateException with guidance to use DynamodbStreamRecord as the funq parameter or CloudEvents via Pipes.","triggerScenarios":"A funq method receiving a DynamoDB stream record through EventBridge Pipes declares a generic input type; getBody is called and always throws.","commonSituations":"Using EventBridge Pipes sourced from DynamoDB Streams while the function signature still expects String/POJO input; copying a handler class and forgetting DynamoDB records need the specific type.","solutions":["Change the funq method parameter to DynamodbStreamRecord","Or transform records to CloudEvents in the Pipes configuration and consume CloudEvent input","Or configure a Pipes filter/enrichment so the delivered payload matches a generic JSON shape"],"exampleFix":"// before\npublic void fun(String json) { ... }\n// after\npublic void fun(DynamodbStreamRecord record) { ... }","handlingStrategy":"type-guard","validationCode":"// ensure the funq parameter type matches the Pipes source\nif (record instanceof DynamodbStreamRecord) {\n    process(record);\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    // switch to DynamodbStreamRecord or CloudEvents handling\n}","preventionTips":["Match the funq method signature to the Pipes source type","Use CloudEvents transformation in Pipes for uniform payloads","Document Pipes source and function input together"],"tags":["dynamodb","eventbridge-pipes","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"}