Skip to content

Cannot delete Redshift cluster: "deregister the associated lakehouse" fails with "You don't have permission to run Glue:GetCatalog"

0

I am trying to delete a provisioned Amazon Redshift cluster that is integrated with the AWS Glue Data Catalog (lakehouse / unified governance). The deletion is blocked with:

The cluster has an associated lakehouse glue catalog. Deregister it before you delete the cluster.

When I run the deregistration:

aws redshift modify-lakehouse-configuration \
  --region <region> \
  --lakehouse-registration Deregister \
  --cluster-identifier <cluster-identifier>

it fails with:

An error occurred (UnauthorizedOperation) when calling the ModifyLakehouseConfiguration operation:
You don't have permission to run Glue:GetCatalog.

This happens even though the role I am using has the AdministratorAccess IAM policy, and even after I attached the AWSLakeFormationDataAdmin managed IAM policy. Why does Glue:GetCatalog still fail, and what does the role actually need to complete the deregistration and delete the cluster?

Answer

The lakehouse catalog associated with the cluster is governed by AWS Lake Formation, not by IAM alone. During deregistration, Redshift calls Glue:GetCatalog against that catalog on your behalf, and Lake Formation evaluates whether the calling role is authorized as a Lake Formation principal.

The key point: being a Lake Formation Data Lake administrator is a Lake Formation setting, which is not the same as attaching an IAM policy such as AWSLakeFormationDataAdmin.

  • The IAM policy grants the API permissions to call Lake Formation.
  • Being a Data Lake administrator is a registration inside Lake Formation itself (the list of administrator principals for the account and Region).

If the role is not registered as a Data Lake administrator (or does not hold an equivalent Lake Formation permission on the catalog), Lake Formation denies the Glue:GetCatalog call during deregistration, regardless of the role's IAM permissions. That is why an IAM administrator policy alone does not get past this step.

Resolution

Complete these steps in order.

1. Register the role as a Lake Formation Data Lake administrator

In the account and Region where the cluster lives:

Console

  1. Open the Lake Formation console.
  2. Go to Administration, then Administrative roles and tasks (in some console versions, Data lake administrators).
  3. Under Data lake administrators, choose Add, select the role that will perform the deregistration, and save.

AWS CLI

This call replaces the administrator list, so include any existing administrators as well:

aws lakeformation put-data-lake-settings \
  --region <region> \
  --data-lake-settings '{"DataLakeAdmins":[{"DataLakePrincipalIdentifier":"arn:aws:iam::<account-id>:role/<role-name>"}]}'

The principal making this change must already be a Data Lake administrator. If your deregistration role is not one and you have no other administrator, have an existing Data Lake administrator add it first.

2. Deregister the lakehouse configuration

Signed in as that role, run:

aws redshift modify-lakehouse-configuration \
  --region <region> \
  --lakehouse-registration Deregister \
  --cluster-identifier <cluster-identifier>

3. Delete the cluster

Once the deregistration succeeds:

aws redshift delete-cluster \
  --region <region> \
  --cluster-identifier <cluster-identifier> \
  --skip-final-cluster-snapshot

Use --final-cluster-snapshot-identifier <name> instead of --skip-final-cluster-snapshot if you want to retain a final snapshot.

Note on network / organization policies

If your account uses a network-based control (for example, a Service Control Policy that restricts access by source IP or VPC endpoint), run the deregistration from an allowed network location. A network block produces a different error (an explicit AccessDenied naming the policy on ModifyLakehouseConfiguration), which is distinct from the Glue:GetCatalog permission error above.

How to tell the two errors apart

ErrorLayerFix
AccessDenied ... explicit deny in a service control policy on ModifyLakehouseConfigurationNetwork / organization policyRun from an allowed network location, or have your Org admin adjust the policy
UnauthorizedOperation: You don't have permission to run Glue:GetCatalogLake Formation authorizationRegister the role as a Lake Formation Data Lake administrator (Step 1 above)

References

  1. Deregister from the AWS Glue Data Catalog (Amazon Redshift, provisioned)
  2. Lake Formation personas and IAM permissions reference (Data Lake administrator)
  3. Create a data lake administrator
  • If my answer was helpful, I would appreciate it if you could mark it as the accepted answer.

1 Answer
1

glue:GetCatalog fails because IAM is not the only check here. The catalog created when the cluster was registered is governed by Lake Formation, so Lake Formation also has to authorize the caller. AdministratorAccess covers the IAM permissions that the Redshift documentation lists for deregistration. Attaching the AWSLakeFormationDataAdmin IAM policy does not make the role a data lake administrator. That is a separate setting in Lake Formation. Data lake administrators have implicit Describe access to all resources in the Data Catalog.

There is also a catch with that policy. AWSLakeFormationDataAdmin contains an explicit Deny for lakeformation:PutDataLakeSettings. While it is attached, the role cannot add itself as data lake administrator, even with AdministratorAccess.

Steps:

  1. Detach AWSLakeFormationDataAdmin from the role.
  2. In the Lake Formation console, go to Administration > Administrative roles and tasks. Under Data lake administrators, choose Add and add the role. If you use the CLI instead, note that put-data-lake-settings replaces the existing administrator list. Read the current settings with get-data-lake-settings first and keep the existing administrators.
  3. Run the deregistration again: aws redshift modify-lakehouse-configuration --region <region> --cluster-identifier <cluster-identifier> --lakehouse-registration Deregister
  4. Delete the cluster: aws redshift delete-cluster --region <region> --cluster-identifier <cluster-identifier> --final-cluster-snapshot-identifier <snapshot-name> Use --skip-final-cluster-snapshot instead if you don't need a final snapshot.

If the call still fails, check whether an SCP or a permissions boundary denies glue:GetCatalog or glue:DeleteCatalog for the role. If neither does, open a case with AWS Support and include the request ID of the failed call.

EXPERT

answered a month ago

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.