dynamodb-queries

Modeling Relational Data in DynamoDB (nested relationship)

时光毁灭记忆、已成空白 提交于 2019-12-04 14:16:23
Entity Model: I've read AWS Guide about create a Modeling Relational Data in DynamoDB . It's so confusing in my access pattern. Access Pattern +-------------------------------------------+------------+------------+ | Access Pattern | Params | Conditions | +-------------------------------------------+------------+------------+ | Get TEST SUITE detail and check that |TestSuiteID | | | USER_ID belongs to project has test suite | &UserId | | +-------------------------------------------+------------+------------+ | Get TEST CASE detail and check that | TestCaseID | | | USER_ID belongs to project

How return JSON object from DynamoDB with appsync?

一世执手 提交于 2019-12-01 00:07:37
How I can get JSON object in response from DynamoDB ? I store data in DB as array of object in format JSON. I have next mapping template request { "version": "2017-02-28", "operation": "PutItem", "key": { "userId": { "S": "$context.identity.username" } }, #set( $attrs = $util.dynamodb.toMapValues($ctx.args)) #set( $attrs.categories = $util.dynamodb.toDynamoDB($ctx.args.categories)) "attributeValues": $util.toJson($attrs) } and mapping template response #set( $result = $ctx.result) #set( $result.categories = $util.parseJson($ctx.result.categories)) $util.toJson($result) but I got response in