I would like some help; i'm trying to get a certain item from the dynamodb table by calling it with the specific id (primary key) e with a global secondary index called index_book.
The function of interest is as follows:
case "GET /book/{id}":
body = await dynamo
.get({
TableName: "book",
Key: {
id: event.pathParameters.id
}
})
.promise();
break;
The moment I go to call the url with a specific id, so for example /book/7 (where 7 is id) I get the following error:
"The provided key element does not match the schema"
Can you help me please? I will be very grateful to you.