How to recover deleted table from Glue Data Catalog AWS

Viewed 594

I've deleted a table from the Glue Data Catalog but I want to restore it. I already track the event in CloudTrail but I don't know how to restore it.

1 Answers

AWS Glue does not have any direct back-up methods, you can create your own solution that you periodically back-up your tables with for example the following command.

aws glue get-tables --database-name my-database > glue-my-database.json

and store this on a S3 with lifecycle management or even cross-region replication.

Restoring to AWS Glue can be done with the following AWS CLI command

aws glue create-table --cli-input-json ...

For your situation it seems that you are out of luck, the tables that are deleted will stay deleted.

Related