aws / aws/aws-appsync-community

DynamoDB Resolvers cannot know how many RCU/WCU an operation has consumed

Open
#163 2 comments 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
HTML
Stars
507
Forks
37
PR merge metrics
No merged PRs in 30d

Description

The DynamoDB APIs accept the parameter "ReturnConsumedCapacity". When passed the result includes the consumed capacity units of the executed operation.

With that it is possible to associate "a cost" with a specific access pattern. This is ideal when trying to figure out what needs to be optimized in order to reduce the WCU/RCU.

When hitting DynamoDB directly from a Lambda function I always pass this parameter and then attach the result to an embedded CloudWatch metric. This is a recommendation comming directly from Rick Houlihan [during one of his Re:Invent sessions](https://www.youtube.com/watch?v=6yqfmXiZTlM).

A cannot do this with AppSync currently. There is not way to pass the "ReturnConsumedCapacity" to DynamoDB.

If it were possible to pass this parameter I would rely in a pipeline resolver in order to execute the DynamoDB operation and then notify to something else what the consumed units of the operation were.

Contributor guide

Open the contributing guide

Research direction

Start by reading the AppSync DynamoDB resolver behavior and the DynamoDB API documentation for ReturnConsumedCapacity. Done means a pipeline resolver can request that parameter for a DynamoDB operation and access the operation's consumed capacity so it can be passed to another step or metric.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql
Domain
api, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.