This project reproduces a bug in DynamoDB Local starting from version 3.0.0 where UpdateItem operations using the attributeUpdates parameter silently drop attributes when AttributeValueUpdate does not include an explicit AttributeAction.
According to the DynamoDB API documentation, when action is omitted from an AttributeValueUpdate, it should default to PUT. DynamoDB Local versions 3.0.0+ ignore these updates entirely, creating items with only the key attributes instead of persisting the specified attributes.
- Expected behavior: Attributes without explicit actions are treated as
PUToperations (works in real DynamoDB and DynamoDB Local v1.x-2.x) - Actual behavior: Attributes are silently dropped (broken in DynamoDB Local v3.0.0+)
- Workaround: Explicitly set
AttributeAction.PUTon each update
% ./gradlew test
> Task :app:test
DynamoDBLocalAttributeUpdateBugTest > [3] dynamodbLocalVersion = "3.0.0" > attributeUpdatesWithoutExplicitActionShouldPersist() FAILED
org.opentest4j.AssertionFailedError at DynamoDBLocalAttributeUpdateBugTest.java:143
DynamoDBLocalAttributeUpdateBugTest > [4] dynamodbLocalVersion = "3.1.0" > attributeUpdatesWithoutExplicitActionShouldPersist() FAILED
org.opentest4j.AssertionFailedError at DynamoDBLocalAttributeUpdateBugTest.java:143
DynamoDBLocalAttributeUpdateBugTest > [5] dynamodbLocalVersion = "3.2.0" > attributeUpdatesWithoutExplicitActionShouldPersist() FAILED
org.opentest4j.AssertionFailedError at DynamoDBLocalAttributeUpdateBugTest.java:143
DynamoDBLocalAttributeUpdateBugTest > [6] dynamodbLocalVersion = "3.3.0" > attributeUpdatesWithoutExplicitActionShouldPersist() FAILED
org.opentest4j.AssertionFailedError at DynamoDBLocalAttributeUpdateBugTest.java:143
12 tests completed, 4 failed
> Task :app:test FAILED