Course 1, Week 1, Exercise 3

Getting the following error while running the following Athena SQL query command

df_count_by_category = wr.athena.read_sql_query(

QueryFailed: [ErrorCategory:USER_ERROR, ErrorCode:ENTITY_NOT_FOUND], The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: J1PJRC1BJB1KD2DX; S3 Extended Request ID: Xt0PxLgZ5xyM6yi6uiVQxECcuVrWA9Y9F36+7p9FScUwBGEIyPI+KMJTT+/2c89SREX9tnlmYBY=; Proxy: null), S3 Extended Request ID: Xt0PxLgZ5xyM6yi6uiVQxECcuVrWA9Y9F36+7p9FScUwBGEIyPI+KMJTT+/2c89SREX9tnlmYBY= (Path: s3://aws-athena-query-results-049250466231-us-east-1/temp_table_2142fe0f1ab2447bb3110612aa0649dd). You may need to manually clean the data at location ‘s3://aws-athena-query-results-049250466231-us-east-1/tables/d5557b97-40be-478e-9094-3abbdde8ce68’ before retrying. Athena will not delete data in your account.

1 Like

Tried deleting and creating the bucket several times, but the same error persists

Hi @shanup, welcome to our community!

Thanks for post your problem. Can please share your query details assigned into statement_count_by_category object?


1 Like

Hello Raul, The whole of yesterday I must have re-run the notebook several times, after deleting the buckets, restarting the assignment from scratch etc, and it kept throwing the same error over and over again.

Today I restarted the assignment once again and ran the exact same notebook again and it went through fine without throwing any error.

Seems like it was an AWS/environment issue, but frustrating because nothing I did yetsterday could solve the problem , and today I did nothing and the problem got resolved by itself.


Thanks for sharing! I’ll report this thread to the teaching team.

I hope you enjoy the course.