Which Category is your question related to?
API
What AWS Services are you utilizing?
REST service type
Provide additional details e.g. code snippets
In my Angular project, I try to use the GET method to retrieve data in my DynamoDB as explained in the documentation but I have this error message:

FYI, I succeed to post a record on my DynamoDB with a PUT method.
Below the code I use to test the GET method:
getPersons() {
const apiName = 'api2a9802ce';
const path = '/persons';
this.amplifyService.api().get(apiName, path, { })
.catch(err => console.log(err.response))
}
that I call in a button on my DOM.
Any input to solve that?
Thanks for your answer,
Hi @jocactus ,
Your calls look correct, we will need some more information from you to help debug the issue. Did you use Amplify-cli to create your AWS resources?
If not, can you add your lambda function code for the get request ?
Hi @nidsharm ,
I used Amplify-cli and strictly follow the steps of the amplify add api with the REST endpoints which enables CRUD operations on an Amazon DynamoDB table and deployed my app.
Hi @jocactus ,
The GET operation you are trying to perform to get all the object from a path, is called a scan in dynamoDB. The Amplify CLI doesn't currently support a scan of the dynamodb table but querying is supported.
You will have modify your path on the getPersons call as follows to get data back:
path = '/persons/partition_key_value' or path = '/persons/object/partition_key_value/sort_key_value (as needed in your use case)
Please let us know if this approach works for you.
HI @jocactus I will close this issue for now. Feel free to reopen in case you need any help.
Hi @jocactus ,
The GET operation you are trying to perform to get all the object from a path, is called a scan in dynamoDB. The Amplify CLI doesn't currently support a scan of the dynamodb table but querying is supported.
You will have modify your path on the getPersons call as follows to get data back:
path = '/persons/partition_key_value' or path = '/persons/object/partition_key_value/sort_key_value (as needed in your use case)
Please let us know if this approach works for you.
Hi. I'm thru this same issue, so, we can not handle scan request when using Amplify? What could be the solution, I mean, if we dont have the actual partition keys to query the table
Hi @VetBoard did you manage to find a solution? It's quite important as i want to get all items from /items.