{"title":"AWS Glue Data Catalog","description":"Connect AWS Glue Data Catalog to Altertable so teams can query Iceberg tables through a shared lakehouse foundation.","order":330,"askSuggestions":["What IAM permissions does the Glue role need?","What should the Glue role trust policy contain?","Why do Glue tables appear but queries fail?","Do I need Lake Formation grants for Glue tables?"],"navigation":true,"body":{"code":"var Component=(()=>{var g=Object.create;var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var y=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),A=(n,e)=>{for(var a in e)l(n,a,{get:e[a],enumerable:!0})},s=(n,e,a,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let o of b(e))!f.call(n,o)&&o!==a&&l(n,o,{get:()=>e[o],enumerable:!(r=p(e,o))||r.enumerable});return n};var w=(n,e,a)=>(a=n!=null?g(m(n)):{},s(e||!n||!n.__esModule?l(a,\"default\",{value:n,enumerable:!0}):a,n)),I=n=>s(l({},\"__esModule\",{value:!0}),n);var i=y((D,c)=>{c.exports=_jsx_runtime});var S={};A(S,{default:()=>u,frontmatter:()=>x});var t=w(i()),x={title:\"AWS Glue Data Catalog\",description:\"Connect AWS Glue Data Catalog to Altertable so teams can query Iceberg tables through a shared lakehouse foundation.\",order:330,askSuggestions:[\"What IAM permissions does the Glue role need?\",\"What should the Glue role trust policy contain?\",\"Why do Glue tables appear but queries fail?\",\"Do I need Lake Formation grants for Glue tables?\"]};function d(n){let e={a:\"a\",code:\"code\",h1:\"h1\",h2:\"h2\",li:\"li\",ol:\"ol\",p:\"p\",pre:\"pre\",strong:\"strong\",ul:\"ul\",...n.components},{DocsPreviewDocument:a,DocsPreviewSection:r}=e;return a||h(\"DocsPreviewDocument\",!0),r||h(\"DocsPreviewSection\",!0),(0,t.jsxs)(a,{anchors:\"aws-glue-data-catalog prerequisites connect-aws-glue-data-catalog verify-the-connection troubleshooting\",children:[(0,t.jsxs)(r,{sectionId:\"aws-glue-data-catalog\",anchors:\"\",ancestors:\"\",index:\"0\",children:[(0,t.jsx)(e.h1,{id:\"aws-glue-data-catalog\",children:\"AWS Glue Data Catalog\"}),`\n`,(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.a,{href:\"https://docs.aws.amazon.com/glue/latest/dg/components-overview.html\",children:\"AWS Glue Data Catalog\"}),\" can act as the catalog for Iceberg tables stored in AWS.\"]}),`\n`,(0,t.jsx)(e.p,{children:\"Connect Glue to Altertable when Glue is the source of truth for table metadata and Altertable should query those Iceberg tables alongside other lakehouse data.\"}),`\n`]}),(0,t.jsxs)(r,{sectionId:\"prerequisites\",anchors:\"\",ancestors:\"\",index:\"1\",children:[(0,t.jsx)(e.h2,{id:\"prerequisites\",children:\"Prerequisites\"}),`\n`,(0,t.jsx)(e.p,{children:\"Prepare the AWS account ID, region, IAM role ARN, and the Glue database to use by default. The role must allow reading Glue catalog metadata and the underlying Iceberg objects.\"}),`\n`,(0,t.jsxs)(e.p,{children:[\"Altertable assumes that role from a dedicated AWS principal, using an external ID unique to your organization (\",(0,t.jsx)(e.code,{children:\"altertable-\"}),\" followed by the organization ID). The role trust policy must allow \",(0,t.jsx)(e.code,{children:\"sts:AssumeRole\"}),\" from that principal and require \",(0,t.jsx)(e.code,{children:\"sts:ExternalId\"}),\" equal to the external ID. The Glue catalog form shows both values and a trust policy you can copy, for example:\"]}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-json\",children:`{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Principal\": {\n        \"AWS\": \"arn:aws:iam::123456789012:user/altertable-customer-role-broker\"\n      },\n      \"Action\": \"sts:AssumeRole\",\n      \"Condition\": {\n        \"StringEquals\": {\n          \"sts:ExternalId\": \"altertable-7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n        }\n      }\n    }\n  ]\n}\n`})}),`\n`,(0,t.jsx)(e.p,{children:\"Use the principal ARN and external ID shown in Altertable, not the values in this example.\"}),`\n`,(0,t.jsx)(e.p,{children:\"A read-only policy must cover:\"}),`\n`,(0,t.jsxs)(e.ul,{children:[`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:\"glue:GetCatalog\"}),\", \",(0,t.jsx)(e.code,{children:\"glue:GetDatabase\"}),\", \",(0,t.jsx)(e.code,{children:\"glue:GetDatabases\"}),\", \",(0,t.jsx)(e.code,{children:\"glue:GetTable\"}),\", and \",(0,t.jsx)(e.code,{children:\"glue:GetTables\"}),\" on the catalog, intended databases, and tables. \",(0,t.jsx)(e.code,{children:\"glue:GetCatalog\"}),\" is what the Glue Iceberg endpoint checks first.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:\"s3:ListBucket\"}),\" on the data bucket, scoped to the relevant prefixes.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:\"s3:GetObject\"}),\" on those prefixes, including Iceberg metadata, manifests, and data files.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:\"kms:Decrypt\"}),\" on the key when those objects use customer-managed KMS encryption.\"]}),`\n`]}),`\n`,(0,t.jsxs)(e.p,{children:[\"If AWS Lake Formation governs the tables, configure its permissions as well as IAM. Use the AWS \",(0,t.jsx)(e.a,{href:\"https://docs.aws.amazon.com/glue/latest/dg/security_iam_service-with-iam.html\",children:\"Glue IAM guide\"}),\" to scope the role and its trust policy.\"]}),`\n`]}),(0,t.jsxs)(r,{sectionId:\"connect-aws-glue-data-catalog\",anchors:\"\",ancestors:\"\",index:\"2\",children:[(0,t.jsx)(e.h2,{id:\"connect-aws-glue-data-catalog\",children:\"Connect AWS Glue Data Catalog\"}),`\n`,(0,t.jsxs)(e.ol,{children:[`\n`,(0,t.jsx)(e.li,{children:\"Create or choose an IAM role with the Glue and storage permissions required for the tables Altertable should query.\"}),`\n`,(0,t.jsxs)(e.li,{children:[\"Open \",(0,t.jsx)(e.strong,{children:\"Catalogs\"}),\" in the Altertable app.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[\"Click \",(0,t.jsx)(e.strong,{children:\"New catalog\"}),\".\"]}),`\n`,(0,t.jsxs)(e.li,{children:[\"Select \",(0,t.jsx)(e.strong,{children:\"AWS Glue Data Catalog\"}),\".\"]}),`\n`,(0,t.jsx)(e.li,{children:\"Enter the AWS account ID, region, role ARN, and the default database for unqualified table names. Tables in other databases stay queryable.\"}),`\n`,(0,t.jsx)(e.li,{children:\"Copy the trust policy from the form into the IAM role's trust relationship.\"}),`\n`,(0,t.jsx)(e.li,{children:\"Save the catalog, then query the Glue-backed tables with SQL.\"}),`\n`]}),`\n`,(0,t.jsx)(e.p,{children:\"Scope the IAM role to the catalogs, databases, tables, and storage locations Altertable needs. If table data is encrypted with AWS KMS, include the required decrypt permissions.\"}),`\n`]}),(0,t.jsxs)(r,{sectionId:\"verify-the-connection\",anchors:\"\",ancestors:\"\",index:\"3\",children:[(0,t.jsx)(e.h2,{id:\"verify-the-connection\",children:\"Verify the connection\"}),`\n`,(0,t.jsxs)(e.p,{children:[\"Open the saved catalog and check that the intended database and tables appear. In \",(0,t.jsx)(e.a,{href:\"/docs/lakehouse/query/sql-explorer\",children:\"SQL Explorer\"}),\", replace the example names and read a known table:\"]}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-sql\",children:`SELECT * FROM my_catalog.my_database.my_table LIMIT 10;\n`})}),`\n`,(0,t.jsx)(e.p,{children:\"Compare a known record with its source and inspect the returned column types. Metadata discovery alone does not verify S3 access.\"}),`\n`]}),(0,t.jsxs)(r,{sectionId:\"troubleshooting\",anchors:\"\",ancestors:\"\",index:\"4\",children:[(0,t.jsx)(e.h2,{id:\"troubleshooting\",children:\"Troubleshooting\"}),`\n`,(0,t.jsxs)(e.ul,{children:[`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:\"Role cannot be assumed:\"}),\" confirm the trust policy principal matches Altertable's principal ARN, \",(0,t.jsx)(e.code,{children:\"sts:ExternalId\"}),\" matches the organization's external ID, and the role ARN is correct.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:\"Database or table is missing:\"}),\" check the region, Glue IAM resources, and Lake Formation grants.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:\"Tables appear but data cannot be read:\"}),\" check S3 prefixes, object permissions, and KMS decrypt access.\"]}),`\n`,(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:\"Schema changed upstream:\"}),\" inspect the source table metadata and recheck the catalog before changing queries.\"]}),`\n`]})]})]})}function u(n={}){let{wrapper:e}=n.components||{};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(d,{...n})}):d(n)}function h(n,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+n+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return I(S);})();\n;return Component;"},"_id":"docs/lakehouse/external-catalogs/aws-glue.mdx","_raw":{"sourceFilePath":"docs/lakehouse/external-catalogs/aws-glue.mdx","sourceFileName":"aws-glue.mdx","sourceFileDir":"docs/lakehouse/external-catalogs","contentType":"mdx","flattenedPath":"docs/lakehouse/external-catalogs/aws-glue"},"type":"Docs","path":"/lakehouse/external-catalogs/aws-glue","level":3,"parent":"lakehouse/external-catalogs"}