Week 5 -An error occurred (ResourceNotFoundException) when calling the DeleteTable operation: Requested resource not found: Table: not found
When the terminal error claims that there is no table found, it does NOT mean that the table does not exist. It simply means that your code failed to find it.
Error
The behaviour when trying to drop the table.
/backend-flask $ ./bin/ddb/drop cruddur-messages prod == dynamodb-list-table deleting cruddur-messages... An error occurred (ResourceNotFoundException) when calling the DeleteTable operation: Requested resource not found: Table: cruddur-messages not found
Problem code
# backend-flask/bin/ddb/drop
TABLE_NAME="cruddur-messages"
echo "deleting $TABLE_NAME..."
aws dynamodb delete-table $ENDPOINT_URL --table-name $TABLE_NAME
Solution
✅ Always make sure that the env variables you are using are:
free of spelling mistakes
safely stored with correct values.
$ echo $ENDPOINT_URL
________ <----------- pitch-black nothingness