-
Notifications
You must be signed in to change notification settings - Fork 878
ReturnConsumedCapacity Support for DynamoDB Transactions in DynamoDBContext and Table APIs #4321
Description
Describe the feature
Add ReturnConsumedCapacity support for DynamoDB transactional operations exposed through DynamoDBContext and Table-level APIs in the AWS SDK for .NET.
Currently, when executing transactions via high-level .NET abstractions (such as DynamoDBContext transactional APIs or Table-based helpers), there is no way to request or retrieve consumed capacity information. This capability is supported by DynamoDB itself and exposed in other SDKs, but is missing from the .NET high-level APIs.
Use Case
I need this feature to understand and control the capacity cost of transactional workloads when using DynamoDB through DynamoDBContext.
Without ReturnConsumedCapacity:
- Transactional RCUs/WCUs are opaque at the request level
- Capacity usage cannot be attributed per transaction or per table
- Cost analysis and performance tuning for transactions is significantly harder than for non-transactional operations
Proposed Solution
Expose ReturnConsumedCapacity at the DynamoDBContext and Table abstraction level for transactional operations, in a way consistent with existing .NET SDK patterns.
Specifically:
- Allow configuring ReturnConsumedCapacity when executing transactional reads and writes through DynamoDBContext
- Surface consumed-capacity data in the transaction response
- Include total and per-table capacity information, consistent with other DynamoDB APIs
This should not require customers to drop down to low-level TransactWriteItemsRequest / TransactGetItemsRequest APIs.
Other Information
The AWS SDK for Java v2 Enhanced Client already supports this feature, providing a clear reference for API shape and behavior.
https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/enhanced/dynamodb/model/TransactWriteItemsEnhancedRequest.Builder.html
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS .NET SDK and/or Package version used
AWSSDK.DynamoDBv2 4.0.13
Targeted .NET Platform
n/a
Operating System and version
n/a