Description
The aws-ddb-sink Kamelet does not reliably set the DynamoDB operation via its operation property. The Kamelet template sets the operation as an Exchange property (setProperty name=operation), but this does not take effect in all cases — most notably for UpdateItem.
The Kamelet template currently does this (in kamelets/aws-ddb-sink.kamelet.yaml):
template:
from:
uri: "kamelet:source"
steps:
- setProperty:
name: operation
constant: "{{operation}}"
- transformDataType:
toType: "aws2-ddb:application-json"
- to:
uri: "aws2-ddb:{{table}}"
parameters:
operation: "{{operation}}"
Even though operation is passed both as an Exchange property and as an endpoint parameter, the UpdateItem operation is not applied correctly. This caused the integration test aws-ddb-sink-update-item.citrus.it.yaml to fail consistently, and the test was disabled.
Steps to Reproduce
- Use the
aws-ddb-sink Kamelet with operation=UpdateItem
- Send an update item JSON payload
- The operation defaults to
PutItem instead of UpdateItem
Expected Behavior
The Kamelet should reliably apply the configured operation (e.g. UpdateItem) when processing messages.
Actual Behavior
The UpdateItem operation is not applied; the Kamelet falls back to the default PutItem operation.
Workaround
Setting the Exchange property operation in the calling route before invoking the Kamelet sink works:
- setProperty:
name: operation
constant: "{{aws.ddb.operation}}"
- to:
uri: "kamelet:aws-ddb-sink"
parameters:
operation: "{{aws.ddb.operation}}"
Additional Context
- The test
aws-ddb-sink-update-item.citrus.it.yaml has the workaround applied and is now passing
- The root cause may be related to how the
kamelet: component handles property binding vs. Exchange property propagation — the setProperty inside the Kamelet template may be overwritten or not propagated correctly through the transformDataType step
- This may need investigation in
apache/camel (the Kamelet runtime) rather than a fix in the Kamelet template itself
Claude Code on behalf of Christoph Deppisch
Description
The
aws-ddb-sinkKamelet does not reliably set the DynamoDB operation via itsoperationproperty. The Kamelet template sets the operation as an Exchange property (setProperty name=operation), but this does not take effect in all cases — most notably forUpdateItem.The Kamelet template currently does this (in
kamelets/aws-ddb-sink.kamelet.yaml):Even though
operationis passed both as an Exchange property and as an endpoint parameter, theUpdateItemoperation is not applied correctly. This caused the integration testaws-ddb-sink-update-item.citrus.it.yamlto fail consistently, and the test was disabled.Steps to Reproduce
aws-ddb-sinkKamelet withoperation=UpdateItemPutIteminstead ofUpdateItemExpected Behavior
The Kamelet should reliably apply the configured
operation(e.g.UpdateItem) when processing messages.Actual Behavior
The
UpdateItemoperation is not applied; the Kamelet falls back to the defaultPutItemoperation.Workaround
Setting the Exchange property
operationin the calling route before invoking the Kamelet sink works:Additional Context
aws-ddb-sink-update-item.citrus.it.yamlhas the workaround applied and is now passingkamelet:component handles property binding vs. Exchange property propagation — thesetPropertyinside the Kamelet template may be overwritten or not propagated correctly through thetransformDataTypestepapache/camel(the Kamelet runtime) rather than a fix in the Kamelet template itselfClaude Code on behalf of Christoph Deppisch