Maggy
Maggy

Reputation: 341

AWS DynamoDB UnknownOperationException

I´ve tried to set up a very simple Table just like in this example but it does not work. When I test it in the AWS Console of API Gateway I always get the following response:

Endpoint response body before transformations: {"__type":"com.amazon.coral.service#UnknownOperationException"}

My Mapping Table looks like the following:

#set($inputRoot = $input.path('$'))
{ 
    "TableName": "Subscriptions",
    "Item": {
        "subscriptionId": {
            "S": "$inputRoot.subscriptionId"
        },
        "userId": {
            "S": "$inputRoot.userId"
        },
        "durationInMonth": {
            "S": "$inputRoot.durationInMonth"
        },
        "sku": {
            "S": "$inputRoot.sku"
        }
    }
}

And my Requestbody looks like this.

{
  "userId": "4",
  "subscriptionId": "5",
  "sku": "12345",
  "durationInMonth": "1"
}

What am I doing wrong?

Thanks for helping. Have a nice Weekend.

Nathalie

Upvotes: 3

Views: 5064

Answers (1)

Maggy
Maggy

Reputation: 341

I got it.

It was just a stupid typo in the DynamoDB Action.

I did wrote Putitem but it needs to be PutItem

Have a nice Day

Upvotes: 6

Related Questions