Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for DynamoDB ReturnValues #341

Open
h2whoa3 opened this issue Dec 26, 2023 · 2 comments
Open

Support for DynamoDB ReturnValues #341

h2whoa3 opened this issue Dec 26, 2023 · 2 comments
Labels
feature-request New feature or request

Comments

@h2whoa3
Copy link

h2whoa3 commented Dec 26, 2023

I'm trying to update an item attribute in a DynamoDb table with AppSync. Once successful i want to use the previous value of that attribute as the key in my next call (I'm using pipeline resolvers).

To achieve this with DynamoDB you just set UPDATED_OLD as the return value.

I cannot find any documentation for specifying the return value of a DynamoDB resolver for AppSync. Ive tried the following.

{
  "version" : "2018-05-29",
  "operation" : "UpdateItem",
  "key": {
        "id": $util.dynamodb.toDynamoDBJson("foo")
      },
   "condition" : {
   "expression" : "attribute_exists(id)"
    },
    "update" : {
    "expression" : "SET bar = :bar",
    "expressionValues" : {
        ":bar" :  {"S" : "$bar"}
      }
    },
    "returnValues": "UPDATED_OLD"
  }

But its not valid syntax.

"message": "Unsupported element '$[returnValues]'."

@onlybakam onlybakam added the feature-request New feature or request label Jan 5, 2024
@onlybakam
Copy link
Contributor

This is currently not supported in AppSync. I've marked the issue as a feature request.

@perryn
Copy link

perryn commented Mar 14, 2024

I need this feature too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants