I am having trouble accessing a DynamoDb table, as I keep encountering a "Resource not found" error.
The table is set up like this; it's Active and located in the Paris Region (eu-west-3).
https://i.sstatic.net/W0IZs.png
This is the code snippet I am using:
export class EncuestaComponent implements OnInit {
[...]
client: DynamoDBClient = new DynamoDBClient({
region : 'eu-west-3',
credentials: {
accessKeyId: '[REDACTED]',
secretAccessKey: '[REDACTED]'
}
});
[...]
onDbClick() {
const commandParams = {};
const input: BatchExecuteStatementInput = {
Statements: [
{Statement: "SELECT opciones FROM encuesta.encuesta WHERE id = 'user.1'"}
],
}
const command = new BatchExecuteStatementCommand(input);
this.client.send(command).
then(data => console.log(data.Responses![0].Error)).
catch(error => {console.log("Error"); console.log(error)});
}
Upon checking the console, it appears that the then method was executed, but the output message says {Code: 'ResourceNotFound', Message: 'Requested resource not found'}
Can anyone spot what might be going wrong here?