Commit Graph
6 Commits
Author SHA1 Message Date
Hector Ventura 5ab178e10d fix(dynamodb): improve conformance across validation, expressions, and queries (#826)
* fix(dynamodb): improve conformance across validation, expressions, and queries

- Rename InvalidParameterValue → ValidationException for table-name errors
- Enforce min-length 3 on table names for all operations, not just CreateTable
- ListTables: alphabetical order, Limit validation (1–100), pagination
- Enum validation (ReturnValues, ReturnConsumedCapacity) fires before table lookup
- ProjectionExpression support on GetItem, Query, Scan, BatchGetItem
- Select=COUNT returns Count/ScannedCount and omits Items
- Parallel scan: Segment/TotalSegments validation and hash-based sharding
- Reserved words rejected in FilterExpression, ConditionExpression, UpdateExpression
- Legacy API: AttributesToGet, AttributeUpdates, QueryFilter, ScanFilter, KeyConditions
- TransactWriteItems idempotency token with payload-hash conflict detection
- ReturnValuesOnConditionCheckFailure on PutItem, UpdateItem, DeleteItem
- Item size limit (400 KB) and number normalization on write
- Tags API: TagResource, UntagResource, ListTagsOfResource with ARN validation
- New Java and Node SDK conformance tests covering all changes above

* fix(dynamodb): fix unit testing
2026-05-13 02:14:00 -05:00
TiM df58c71d8b fix(dynamodb): accept full ARN for TableName across operations (#575) (#580)
Real AWS DynamoDB accepts both short table names and full table ARNs for
TableName inputs. Floci only accepted short names, which broke OpenSearch
Data Prepper's dynamodb source plugin (requires table_arn) and any
Terraform flow that feeds aws_dynamodb_table.x.arn into the SDK.

- Add DynamoDbTableNames resolver: canonicalizes TableName input,
  rejects ARNs targeting index/stream resources, and rejects ARNs whose
  region does not match the request region (400 InvalidParameterValue,
  matching the #450 Lambda ARN precedent).
- Normalize at every DynamoDbService lookup boundary, including
  transaction condition paths and batch RequestItems map keys, so
  internal callers handling request-derived input cannot bypass the
  resolver.
- CreateTable explicitly rejects ARN-form TableName via requireShortName
  so ARN input cannot be persisted as the canonical table identity
  (which would produce nested ARN-on-ARN TableArn values).
- UpdateTable stream enable/disable now use the canonical
  table.getTableName() instead of the raw request TableName. Without
  this, calling UpdateTable via ARN keyed stream state under the ARN
  while reads canonicalize, stranding the stream.
- Covers DescribeTable, Scan, Query, GetItem, PutItem, UpdateItem,
  DeleteItem, BatchGetItem, BatchWriteItem, TransactGetItems,
  TransactWriteItems, UpdateTable, DeleteTable, DescribeTimeToLive,
  UpdateTimeToLive, DescribeContinuousBackups, UpdateContinuousBackups,
  Enable/DisableKinesisStreamingDestination.
- Tests: 32 resolver unit tests, 7 integration tests (item/batch/
  transact/TTL/backups/streaming/validation), 1 awscli bats case.
2026-04-23 22:32:40 -05:00
TiM 3cdb9b0ded fix(dynamodb): support continuous backups PITR actions (#458) 2026-04-15 01:12:50 -05:00
yusuke-uranaka 467f5e0f79 feat(dynamodb): add EnableKinesisStreamingDestination support (#427)
* feat(dynamodb): add EnableKinesisStreamingDestination support

Implement EnableKinesisStreamingDestination, DisableKinesisStreamingDestination,
and DescribeKinesisStreamingDestination API actions for DynamoDB.

When a Kinesis streaming destination is enabled on a table, all item mutations
(INSERT/MODIFY/REMOVE) are automatically forwarded to the configured Kinesis
stream. The Kinesis record payload matches the AWS format with awsRegion,
eventName, tableName, and dynamodb (Keys, NewImage, OldImage, etc.).

Closes #426

* fix(dynamodb): address review feedback for KinesisStreamingDestination

- Decouple Kinesis forwarding from DDB Streams: forwardToKinesisDestinations
  is now called directly from DynamoDbService mutation hooks, independent of
  whether DDB Streams is enabled
- Fix ApproximateCreationDateTime to use milliseconds (was seconds)
- Remove SequenceNumber and StreamViewType from Kinesis payload (not present
  in real AWS)
- Add ApproximateCreationDateTimePrecision inside dynamodb record node
- Return ValidationException when disabling an already-disabled destination
- Simplify persistTable to accept TableDefinition directly
- Add test for disable-already-disabled and payload format assertions
2026-04-13 21:07:41 -05:00
TiM 0ef82f0079 fix(dynamodb): support REMOVE for nested map paths (#402) (#421)
applyRemoveClause() only handled top-level attributes, treating
"ratings.foo" as a literal key name instead of navigating into the
map structure. Add removeValueAtPath() that splits the path into
segments, resolves expression attribute names, and navigates through
nested Map wrappers (M field) to remove the target key.

Includes unit tests for nested paths, expression attribute names,
non-existent paths, and 3-level deep nesting, plus an AWS CLI
compat test reproducing the original report.
2026-04-13 20:07:58 -05:00
Conor Heine eeefb729c4 test: move compatibility tests into this repo (#225)
* test: move compatibility tests into this repo
* fix: add StatisticValues parsing to CloudWatchMetricsJsonHandler
* fix: add missing required abstract methods to EmulatorConfig in EventBridgeSchedulerIntegrationTest
* test: add sdk tests for multipart S3 copy coverage
* fix: cover and fix smithy cbor and multipart s3 copy regressions
* test: migrate more test coverage to new folder
* test: add missing ec2 expectation in healthcheck test
* docs: update READMEs in `./compatibility-tests`
2026-04-06 09:35:53 -05:00