I'm using DynamoDB to make a Room Booking Website on Django. Every time I refresh the page, the console throws me a ResourceNotFoundException - Requested resource not found, which seems to be happening when I use table.scan(). On certain pages the table still loads, but on others' I'm shown a debug error.
Here's a part of my code:
dynamodb = boto3.resource(
'dynamodb',
aws_access_key_id="XXXXXX",
aws_secret_access_key="XXXXXX",
region_name="eu-west-2"
)
table = dynamodb.Table(table_name)
response = table.scan(TableName=table_name)
I'm entirely sure that the table_name value contains the correct string.
What could be the problem?