- Newest
- Most votes
- Most comments
The error you're encountering suggests that there might be an issue with the permissions associated with the IAM role you're using for Glue table optimization. While you've taken steps to add the necessary permissions, there are a few additional things you can check:
-
Ensure that the IAM role has the iam:PassRole permission. This is crucial because AWS Glue needs to be able to assume the role you're passing to it. Without this permission, you'll get an AccessDeniedException even if the role has all other required permissions.
-
Double-check that the IAM role has the correct permissions for AWS Glue actions, particularly glue:CreateTableOptimizer and glue:GetTableOptimizer. These are specific to the table optimization feature.
-
Verify that the role has the necessary Lake Formation permissions. If the table is registered with Lake Formation, the role requires Lake Formation ALTER, DESCRIBE, INSERT, and DELETE permissions on the table. If the role doesn't have IAM_ALLOWED_PRINCIPALS group permissions on the table, these Lake Formation permissions are essential.
-
Check if the role has the required permissions for CloudWatch Logs. The optimization process needs to be able to create log groups, log streams, and put log events.
-
If your data is in encrypted S3 buckets, ensure the role has permissions to decrypt S3 objects and generate new data keys for writing to the encrypted buckets.
-
Verify that the AWS Glue service is allowed to assume the IAM role. This is typically set in the role's trust relationship.
If you've confirmed all these permissions and are still encountering the error, you may need to check for any organizational policies or service control policies that might be restricting access. It's also worth checking if there are any resource-based policies on the Glue catalog or database that might be denying access.
If the issue persists after verifying all these points, you may need to contact AWS Support for further assistance, as there could be account-specific factors at play.
Sources
Table optimization prerequisites - AWS Glue
Troubleshooting AWS Glue identity and access - AWS Glue
If you have followed all the above best practices and are still facing the issue, then would suggest reaching AWS support and they'll have better tools to check the detailed errors and find the RCA
Relevant content
- asked 4 months ago
- asked 3 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 months ago
All of those points are met with my IAM role, but no luck.