Cannot delete Glue Failed partition index EntityNotFoundException

0

I attempted to create a partition index on a table. The index failed to create with a backfill error. I see this by calling client.get_partition_indexes().
'IndexStatus': 'FAILED', 'BackfillErrors': [{'Code': 'ENCRYPTED_PARTITION_ERROR'.....

I cannot delete this failed index either through the console or via API client.delete_partition_index(). The attempt to delete returns: EntityNotFoundException: An error occurred (EntityNotFoundException) when calling the DeletePartitionIndex operation: Index with the given indexName : <index_name> does not exist.

The failed index continues to be visible in the console.
2 questions:

  1. How do I get rid of this failed index?
  2. What encryption is causing the error? Is it the bucket being encrypted where the data is stored? Or is it catalog metadata encryption? Or other?
  • Sounds like you have the metadata encrypted and changed/deleted the key. I'm afraid you'll have to recreate the table. Maybe support can help you.

asked a year ago971 views
1 Answer
0

You can try deleting the index using the AWS Command Line Interface (CLI) by running the following command:

 aws glue delete-partition-index --catalog-id <your-catalog-id> --database-name <your-database-name> --table-name <your-table-name> --index-name <your-index-name>. 

As for the encryption causing the error, the error message suggests that there is an issue with an encrypted partition. This could be due to encryption of the data in the partition or encryption of the metadata for the partition. You can check if the data in the partition is encrypted by looking at the properties of the S3 object or checking the encryption settings for the S3 bucket. You can check if the metadata for the partition is encrypted by checking the encryption settings for the Glue Data Catalog.

In addition to checking the S3 object or bucket encryption settings and Glue Data Catalog encryption settings, you can also check if the partition itself is encrypted.

You can do this by running a GET command on the partition in question using the AWS Glue API or AWS CLI, and checking if the partition has encryption enabled.

For example, using the AWS CLI, you can run the following command to retrieve information about a specific partition:

aws glue get-partition --catalog-id <your_catalog_id> --database-name <your_database_name> --table-name <your_table_name> --partition-values <your_partition_values>

In the response, look for the Encryption field, which indicates whether encryption is enabled for the partition or not.

If encryption is enabled, you can check the encryption key settings and permissions to ensure they are correctly set up.

profile pictureAWS
nemf
answered a year ago
  • Thanks for the suggestion but CLI via CloudShell has the same issue - it will get the partition index but claims it does not exist when issuing delete. It's feeling like I may have to drop the table definition to resolve.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions